aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-10-23 04:23:51 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-10-23 04:23:51 -0700
commitbe83aa76d2877770c23d7c2bde0319564a8f7e48 (patch)
tree768ed4b13eeb8317c9e3d062adcd691046efb3e7 /ld
parent034f1a812d8f5655d08e2bdeb5ec7d56caa40d41 (diff)
downloadgdb-be83aa76d2877770c23d7c2bde0319564a8f7e48.zip
gdb-be83aa76d2877770c23d7c2bde0319564a8f7e48.tar.gz
gdb-be83aa76d2877770c23d7c2bde0319564a8f7e48.tar.bz2
Add a test for PR ld/19167
PR ld/19167 * ld-gc/gc.exp: Run pr19167 test. * ld-gc/pr19167.d: New file. * ld-gc/pr19167a.s: Likewise. * ld-gc/pr19167b.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-gc/gc.exp1
-rw-r--r--ld/testsuite/ld-gc/pr19167.d11
-rw-r--r--ld/testsuite/ld-gc/pr19167a.s6
-rw-r--r--ld/testsuite/ld-gc/pr19167b.s2
5 files changed, 28 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 12c4dce..90a31e6 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2015-10-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19167
+ * ld-gc/gc.exp: Run pr19167 test.
+ * ld-gc/pr19167.d: New file.
+ * ld-gc/pr19167a.s: Likewise.
+ * ld-gc/pr19167b.s: Likewise.
+
2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/19161
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index f7438d4..e1d8d01 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -101,6 +101,7 @@ test_gc "Check --gc-section/-r/-u" "gcrel" $ld "-r --gc-sections -u used_func"
run_dump_test "noent"
run_dump_test "abi-note"
run_dump_test "start"
+run_dump_test "pr19167"
if { [is_elf_format] } then {
run_dump_test "all-debug-sections"
}
diff --git a/ld/testsuite/ld-gc/pr19167.d b/ld/testsuite/ld-gc/pr19167.d
new file mode 100644
index 0000000..b8e37be
--- /dev/null
+++ b/ld/testsuite/ld-gc/pr19167.d
@@ -0,0 +1,11 @@
+#source: pr19167a.s
+#source: pr19167b.s
+#ld: --gc-sections -e _start
+#objdump: -s -j _foo
+#target: *-*-linux* *-*-gnu*
+#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
+
+#...
+Contents of section _foo:
+ [0-9a-f]+ [0-9a-f]+ [0-9a-f]+ [0-9a-f]+ [0-9a-f]+[ \t]+This is a test.*
+#pass
diff --git a/ld/testsuite/ld-gc/pr19167a.s b/ld/testsuite/ld-gc/pr19167a.s
new file mode 100644
index 0000000..7dc16e2
--- /dev/null
+++ b/ld/testsuite/ld-gc/pr19167a.s
@@ -0,0 +1,6 @@
+.globl _start
+_start:
+ .dc.a __start__foo
+ .section _foo,"aw",%progbits
+foo:
+ .ascii "This is "
diff --git a/ld/testsuite/ld-gc/pr19167b.s b/ld/testsuite/ld-gc/pr19167b.s
new file mode 100644
index 0000000..78d9d82
--- /dev/null
+++ b/ld/testsuite/ld-gc/pr19167b.s
@@ -0,0 +1,2 @@
+ .section _foo,"aw",%progbits
+ .ascii "a test.\0"