[4/7] ld: Add a simple test for -z nosectionheader

Message ID 20200308234242.1225816-5-hjl.tools@gmail.com
State Superseded
Headers show
Series
  • ELF: Don't require section header on ELF objects
Related show

Commit Message

H.J. Lu March 8, 2020, 11:42 p.m.
From: Kaylee Blake <klkblake@gmail.com>


2020-03-XX  Kaylee Blake  <klkblake@gmail.com>

	PR ld/25617
	* testsuite/ld-elf/nosectionheader.d: New file.
---
 ld/testsuite/ld-elf/nosectionheader.d | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 ld/testsuite/ld-elf/nosectionheader.d

-- 
2.24.1

Patch

diff --git a/ld/testsuite/ld-elf/nosectionheader.d b/ld/testsuite/ld-elf/nosectionheader.d
new file mode 100644
index 0000000000..7154e095e1
--- /dev/null
+++ b/ld/testsuite/ld-elf/nosectionheader.d
@@ -0,0 +1,12 @@ 
+#source: start.s
+#ld: -z nosectionheader
+#readelf: -h -S
+
+#...
+  Start of section headers:[ \t]+0 \(bytes into file\)
+#...
+  Size of section headers:[ \t]+0 \(bytes\)
+  Number of section headers:[ \t]+0
+  Section header string table index:[ \t]+0
+
+There are no sections in this file.