aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-05-20 14:59:05 +0930
committerAlan Modra <amodra@gmail.com>2022-05-20 16:11:25 +0930
commitbd7d326debef642c0a98f859807d794d8d68afc7 (patch)
treee590bc7d3c850d6742191d435ada233a4631e50c /include
parentef5d515048ba13a06815c8fccc420e6e8098da03 (diff)
downloadfsf-binutils-gdb-bd7d326debef642c0a98f859807d794d8d68afc7.zip
fsf-binutils-gdb-bd7d326debef642c0a98f859807d794d8d68afc7.tar.gz
fsf-binutils-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 'include')
-rw-r--r--include/bfdlink.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 27a8e11..09a3ec0 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -493,12 +493,9 @@ struct bfd_link_info
unsigned int noexecstack: 1;
/* Tri-state variable:
- 0 => warn if the linker is creating an executable stack, but
- execstack (above) is 0.
- 1 => warn if the linker is creating an executable stack; ignores
- the value of execstack.
- 2 => do not warn.
- 3 => not used. */
+ 0 => do not warn when creating an executable stack.
+ 1 => always warn when creating an executable stack.
+ >1 => warn when creating an executable stack if execstack is 0. */
unsigned int warn_execstack: 2;
/* TRUE if warnings should not be generated for TLS segments with eXecute