Add a test of the linker's "-z noexecstack" command line option.

ld	* testsuite/ld-elf/elf.exp Run new test.
	* testsuite/ld-elf/stack-noexec.rd New file: Expected readelf output.
This commit is contained in:
Flavio Ceolin 2018-06-05 12:39:47 +01:00 committed by Nick Clifton
parent 84e219e23c
commit 112ba8675e
3 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2018-06-05 Flavio Ceolin <flavio.ceolin@intel.com>
* testsuite/ld-elf/elf.exp Run new test.
* testsuite/ld-elf/stack-noexec.rd New file: Expected readelf output.
2018-06-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jim Wilson <jimw@sifive.com>

View File

@ -165,6 +165,8 @@ if { [istarget *-*-*linux*]
run_ld_link_tests {
{"stack exec" "-z execstack" "" "" {stack.s}
{{readelf {-Wl} stack-exec.rd}} "stack-exec.exe"}
{"stack noexec" "-z noexecstack" "" "" {stack.s}
{{readelf {-Wl} stack-noexec.rd}} "stack-noexec.exe"}
{"stack size" "-z stack-size=0x123400" "" "" {stack.s}
{{readelf {-Wl} stack-size.rd}} "stack-size.exe"}
}

View File

@ -0,0 +1,3 @@
#...
GNU_STACK 0x0+00000 0x0+000000 0x0+000000 0x0+000 0x.+0000 RW 0x[0-9a-f]+
#pass