aboutsummaryrefslogtreecommitdiff
path: root/include/bfdlink.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-05-03 11:42:24 +0100
committerNick Clifton <nickc@redhat.com>2022-05-03 11:42:24 +0100
commitba951afb99912da01a6e8434126b8fac7aa75107 (patch)
treee94ddfba29d29a82ab36d28592d6c8e7edd04350 /include/bfdlink.h
parent46465574a925062ba7dfa72f49ba5199d7a39fc3 (diff)
downloadfsf-binutils-gdb-ba951afb99912da01a6e8434126b8fac7aa75107.zip
fsf-binutils-gdb-ba951afb99912da01a6e8434126b8fac7aa75107.tar.gz
fsf-binutils-gdb-ba951afb99912da01a6e8434126b8fac7aa75107.tar.bz2
Add a linker warning when creating potentially dangerous executable segments. Add tests, options to disabke and configure switches to choose defaults.
Diffstat (limited to 'include/bfdlink.h')
-rw-r--r--include/bfdlink.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h
index b16f3f4..88cc8e2 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -489,10 +489,25 @@ struct bfd_link_info
flags. */
unsigned int noexecstack: 1;
- /* Tri-state variable: 0 => not set by user; 1 => set, warnings
- enabled; 2 => warnings disabled; 3 => unused. */
+ /* 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. */
unsigned int warn_execstack: 2;
+ /* TRUE if warnings should not be generated for TLS segments with eXecute
+ permission or LOAD segments with RWX permissions. */
+ unsigned int no_warn_rwx_segments: 1;
+
+ /* TRUE if the stack can be made executable because of the absence of a
+ .note.GNU-stack section in an input file. Note - even if this field
+ is set, some targets may choose to ignore the setting and not create
+ an executable stack. */
+ unsigned int default_execstack : 1;
+
/* TRUE if we want to produced optimized output files. This might
need much more time and therefore must be explicitly selected. */
unsigned int optimize: 1;