--dynamic-list command line options. */
unsigned int dynamic: 1;
- /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
- flags. */
+ /* Set if the "-z execstack" option has been used to request that a
+ PT_GNU_STACK segment should be created with PF_R, PF_W and PF_X
+ flags set.
+
+ Note - if performing a relocatable link then a .note.GNU-stack
+ section will be created instead, if one does not exist already.
+ The section will have the SHF_EXECINSTR flag bit set. */
unsigned int execstack: 1;
- /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
- flags. */
+ /* Set if the "-z noexecstack" option has been used to request that a
+ PT_GNU_STACK segment should be created with PF_R and PF_W flags. Or
+ a non-executable .note.GNU-stack section for relocateable links.
+
+ Note - this flag is not quite orthogonal to execstack, since both
+ of these flags can be 0. In this case a stack segment can still
+ be created, but it will only have the PF_X flag bit set if one or
+ more of the input files contains a .note.GNU-stack section with the
+ SHF_EXECINSTR flag bit set, or if the default behaviour for the
+ architecture is to create executable stacks.
+
+ The execstack and noexecstack flags should never both be 1. */
unsigned int noexecstack: 1;
/* Tri-state variable:
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. */
+ 1 => always warn when creating an executable stack (for any reason).
+ 2 => only warn when an executable stack has been requested an object
+ file and execstack is 0 or noexecstack is 1.
+ 3 => not used. */
unsigned int warn_execstack: 2;
+ /* TRUE if a warning generated because of warn_execstack should be instead
+ be treated as an error. */
+ unsigned int error_execstack: 1;
- /* TRUE if warnings should not be generated for TLS segments with eXecute
+ /* 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 user gave either --warn-rwx-segments or
- --no-warn-rwx-segments. */
+ --no-warn-rwx-segments on the linker command line. */
unsigned int user_warn_rwx_segments: 1;
+ /* TRUE if warnings generated when no_warn_rwx_segements is 0 should
+ instead be treated as errors. */
+ unsigned int warn_is_error_for_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