aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/retain7.s5
-rw-r--r--ld/testsuite/ld-elf/retain7a.d11
-rw-r--r--ld/testsuite/ld-elf/retain7b.d10
3 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/retain7.s b/ld/testsuite/ld-elf/retain7.s
new file mode 100644
index 0000000..a6cc869
--- /dev/null
+++ b/ld/testsuite/ld-elf/retain7.s
@@ -0,0 +1,5 @@
+ .type _start,"function"
+ .section .text,"axR",%progbits
+ .global _start
+_start:
+ .nop
diff --git a/ld/testsuite/ld-elf/retain7a.d b/ld/testsuite/ld-elf/retain7a.d
new file mode 100644
index 0000000..544ff8a
--- /dev/null
+++ b/ld/testsuite/ld-elf/retain7a.d
@@ -0,0 +1,11 @@
+#name: SHF_GNU_RETAIN 7a
+#source: retain7.s
+#ld: -e _start --gc-sections
+#notarget: ![supports_gnu_osabi] ![check_gc_sections_available]
+#readelf: -h
+
+#failif
+ELF Header:
+#...
+ OS/ABI: UNIX - GNU
+#pass
diff --git a/ld/testsuite/ld-elf/retain7b.d b/ld/testsuite/ld-elf/retain7b.d
new file mode 100644
index 0000000..0e5b12b
--- /dev/null
+++ b/ld/testsuite/ld-elf/retain7b.d
@@ -0,0 +1,10 @@
+#name: SHF_GNU_RETAIN 7a
+#source: retain7.s
+#ld: -r
+#notarget: ![supports_gnu_osabi] ![check_gc_sections_available]
+#readelf: -h
+
+ELF Header:
+#...
+ OS/ABI: UNIX - GNU
+#pass