diff options
author | Alan Modra <amodra@gmail.com> | 2022-05-20 14:59:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-05-20 16:11:25 +0930 |
commit | bd7d326debef642c0a98f859807d794d8d68afc7 (patch) | |
tree | e590bc7d3c850d6742191d435ada233a4631e50c /ld/ld.texi | |
parent | ef5d515048ba13a06815c8fccc420e6e8098da03 (diff) | |
download | gdb-bd7d326debef642c0a98f859807d794d8d68afc7.zip gdb-bd7d326debef642c0a98f859807d794d8d68afc7.tar.gz gdb-bd7d326debef642c0a98f859807d794d8d68afc7.tar.bz2 |
Tidy warn-execstack handling
Make ld and bfd values consistent by swapping values 0 and 2 in
link_info.warn_execstack. This has the benefit of making the value an
"extended" boolean, with 0 meaning no warning, 1 meaning warn, other
values a conditional warning.
Yes, this patch introduces fails on arm/aarch64. Not a problem with
this patch but an arm/aarch64 before_parse problem.
bfd/
* elflink.c (bfd_elf_size_dynamic_sections): Adjust
warn_execstack test.
include/
* bfdlink.h (warn_execstack): Swap 0 and 2 meaning.
ld/
* configure.ac (DEFAULT_LD_WARN_EXECSTACK): Use values of 0,
1, 2 consistent with link_info.warn_execstack.
* ld.texi: Typo fixes.
* lexsup.c (parse_args): Adjust setting of link_info.warn_execstack.
(elf_static_list_options): Adjust help message conditions.
* configure: Regenerate.
Diffstat (limited to 'ld/ld.texi')
-rw-r--r-- | ld/ld.texi | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2654,7 +2654,7 @@ object file formats. For formats like COFF or ELF, the linker can not detect the use of global constructors. @kindex --warn-execstack -@cindex warnings, on exectuable stack +@cindex warnings, on executable stack @cindex executable stack, warnings on @item --warn-execstack @itemx --no-warn-execstack @@ -2667,7 +2667,7 @@ line option has been used, but this behaviour can be overridden by the On the other hand the linker will normally warn if the stack is made executable because one or more of the input files need an execuable stack and neither of the @command{-z execstack} or @command{-z -noexecstack} comman line options have been specified. This warning +noexecstack} command line options have been specified. This warning can be disabled via the @command{--no-warn-execstack} option. Note: ELF format input files specify that they need an executable |