aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-09-19 16:07:44 +0930
committerAlan Modra <amodra@gmail.com>2018-09-19 17:38:46 +0930
commit7e00df65a4e3e281604acab2450812a5fb275743 (patch)
tree1e484b984a1a749dcc5fc07a4331a54ebb48e8bc /ld/testsuite
parent7f0cfc6eb8bbead5c9a1ff3a8dec11d93304f5ad (diff)
downloadgdb-7e00df65a4e3e281604acab2450812a5fb275743.zip
gdb-7e00df65a4e3e281604acab2450812a5fb275743.tar.gz
gdb-7e00df65a4e3e281604acab2450812a5fb275743.tar.bz2
PR23648 testcase
PR 23648 * testsuite/ld-elf/pr23648.d, * testsuite/ld-elf/pr23648.s, * testsuite/ld-elf/pr23648.t: New test.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-elf/pr23648.d9
-rw-r--r--ld/testsuite/ld-elf/pr23648.s15
-rw-r--r--ld/testsuite/ld-elf/pr23648.t10
3 files changed, 34 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr23648.d b/ld/testsuite/ld-elf/pr23648.d
new file mode 100644
index 0000000..2990977
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr23648.d
@@ -0,0 +1,9 @@
+#ld: --gc-sections -T pr23648.t
+#target: [check_gc_sections_available]
+#xfail: frv-*-linux* lm32-*-linux*
+#nm: -B
+
+#failif
+#...
+.*test0
+#...
diff --git a/ld/testsuite/ld-elf/pr23648.s b/ld/testsuite/ld-elf/pr23648.s
new file mode 100644
index 0000000..e82034d
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr23648.s
@@ -0,0 +1,15 @@
+ .text
+ .global entry, _entry
+entry:
+_entry:
+ .dc.a foo
+
+ .section .text.test0,"ax",%progbits
+ .global test0
+test0:
+ .dc.a 0
+
+ .section .text.test1,"ax",%progbits
+ .global test1
+test1:
+ .dc.a 1
diff --git a/ld/testsuite/ld-elf/pr23648.t b/ld/testsuite/ld-elf/pr23648.t
new file mode 100644
index 0000000..5901fc7
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr23648.t
@@ -0,0 +1,10 @@
+MEMORY { code : ORIGIN = 0, LENGTH = 8M }
+
+SECTIONS
+{
+ ENTRY (entry)
+ .text 1M : { *(.text*) } >code
+ /DISCARD/ : { *(*) }
+}
+
+foo = LENGTH (code) != 8M ? test0 : test1;