Changeset 62721d5 in mainline


Ignore:
Timestamp:
2023-10-22T16:45:25Z (7 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f9f9b1
Parents:
b7493ea0
git-author:
Vojtech Horky <vojtech.horky@…> (2023-07-14 13:58:38)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-22 16:45:25)
Message:

Workaround linker warnings about RWX segment

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/meson.build

    rb7493ea0 r62721d5  
    8989        '-T', meson.current_build_dir() / '_link.ld',
    9090]
     91# The kernel is built as ELF but then copied as a blob of bytes and
     92# the permissions are not relevant anyway (needed for binutils 2.39+).
     93kernel_link_args += ldflags_ignore_rwx_segments
    9194
    9295if CONFIG_LTO
  • meson/arch/arm64/meson.build

    rb7493ea0 r62721d5  
    4848# -mstrict-align option is therefore not needed.
    4949arch_boot_c_args = arch_uspace_c_args + [ '-fpic', '-fvisibility=hidden', '-fno-function-sections' ]
    50 arch_boot_link_args = [ '-Wl,-shared', '-Wl,--no-gc-sections' ]
     50arch_boot_link_args = [ '-Wl,-shared', '-Wl,--no-gc-sections' ] + ldflags_ignore_rwx_segments
    5151
    5252if MACHINE == 'virt'
  • meson/arch/ia64/meson.build

    rb7493ea0 r62721d5  
    3838arch_uspace_link_args = [ '-nostdlib', '-lgcc' ]
    3939arch_kernel_link_args = [ '-nostdlib', '-Wl,-EL' ]
    40 arch_boot_link_args = []
     40arch_boot_link_args = ldflags_ignore_rwx_segments
    4141
    4242
  • meson/arch/ppc32/meson.build

    rb7493ea0 r62721d5  
    3737arch_kernel_link_args = [ '-nostdlib', '-Wl,-z,max-page-size=0x1000', '-Wl,--no-check-sections', '-Wl,--no-gc-sections' ]
    3838arch_uspace_link_args = [ '-nostdlib', '-lgcc', '-Wl,-z,max-page-size=0x1000' ]
    39 arch_boot_link_args = []
     39arch_uspace_link_args += ldflags_ignore_rwx_segments
     40arch_boot_link_args = ldflags_ignore_rwx_segments
    4041
    4142rd_essential += [
  • meson/arch/riscv64/meson.build

    rb7493ea0 r62721d5  
    3333arch_kernel_link_args = [ '-nostdlib' ]
    3434arch_uspace_link_args = [ '-nostdlib', '-lgcc' ]
    35 arch_boot_link_args = []
     35arch_boot_link_args = ldflags_ignore_rwx_segments
    3636
    3737rd_essential += [
  • meson/part/compiler_args/meson.build

    rb7493ea0 r62721d5  
    128128        add_project_link_arguments(extra_cflags, language : [ lang ])
    129129endforeach
     130
     131# This flag is needed at several places, hence we define it here.
     132#
     133# For backwards compatibility we try to detect --no-warn-rwx-segments.
     134# However, the autodetection done by Meson also results in
     135# "cannot find entry symbol _start; defaulting to 00000000004000b0"
     136# thus the option is never supported alone. So when detecting we also
     137# specify --entry=main so that the stub source provided by Meson is build
     138# correctly.
     139ldflags_ignore_rwx_segments = []
     140if cc.has_link_argument('-Wl,--no-warn-rwx-segments,--entry=main')
     141    ldflags_ignore_rwx_segments += ['-Wl,--no-warn-rwx-segments']
     142endif
Note: See TracChangeset for help on using the changeset viewer.