[binutils-gdb] Add a test of the linker's "-z noexecstack" command line option.
Nick Clifton
nickc@sourceware.org
Tue Jun 5 11:40:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=112ba8675ec7756ef8065feb655df2d4f39ee731
commit 112ba8675ec7756ef8065feb655df2d4f39ee731
Author: Flavio Ceolin <flavio.ceolin@intel.com>
Date: Tue Jun 5 12:39:47 2018 +0100
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.
Diff:
---
ld/ChangeLog | 5 +++++
ld/testsuite/ld-elf/elf.exp | 2 ++
ld/testsuite/ld-elf/stack-noexec.rd | 3 +++
3 files changed, 10 insertions(+)
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
More information about the Binutils-cvs
mailing list