diff options
author | Flavio Ceolin <flavio.ceolin@intel.com> | 2018-06-05 12:39:47 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-06-05 12:39:47 +0100 |
commit | 112ba8675ec7756ef8065feb655df2d4f39ee731 (patch) | |
tree | d68d23dcc31124e9a89e892cdc53270886d3c2fc /ld | |
parent | 84e219e23cfb7d2632dec0d1c3ac2d942b620882 (diff) | |
download | gdb-112ba8675ec7756ef8065feb655df2d4f39ee731.zip gdb-112ba8675ec7756ef8065feb655df2d4f39ee731.tar.gz gdb-112ba8675ec7756ef8065feb655df2d4f39ee731.tar.bz2 |
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/stack-noexec.rd | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 70e30e6..7d9b456 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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> diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index b74b82c..b3223cf 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -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"} } diff --git a/ld/testsuite/ld-elf/stack-noexec.rd b/ld/testsuite/ld-elf/stack-noexec.rd new file mode 100644 index 0000000..96afb07 --- /dev/null +++ b/ld/testsuite/ld-elf/stack-noexec.rd @@ -0,0 +1,3 @@ +#... + GNU_STACK 0x0+00000 0x0+000000 0x0+000000 0x0+000 0x.+0000 RW 0x[0-9a-f]+ +#pass |