Add options to print, clear and set executable stack state

Add options the modify the state of the executable flag of the GNU_STACK
program header. That header indicates whether the object is requiring an
executable stack.
This commit is contained in:
Christian Göttsche
2023-01-27 17:15:02 +01:00
parent 5908e16cd5
commit f7d304eeb1
7 changed files with 380 additions and 7 deletions

View File

@@ -114,6 +114,15 @@ This means that when a shared library has an entry point (so that it
can be run as an executable), the debugger does not connect to it correctly and
symbols are not resolved.
.IP "--print-execstack"
Prints the state of the executable flag of the GNU_STACK program header, if present.
.IP "--clear-execstack"
Clears the executable flag of the GNU_STACK program header, or adds a new header.
.IP "--set-execstack"
Sets the executable flag of the GNU_STACK program header, or adds a new header.
.IP "--output FILE"
Set the output file name. If not specified, the input will be modified in place.