aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-unique
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-05 14:54:12 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-05 14:54:12 -0700
commitd9409498813c75c1a9e9287ac6e5100ed3130390 (patch)
tree75b6515452b11f03c02353bb1746f965f1a5a4f8 /ld/testsuite/ld-unique
parentaf54f0eb968ba8cb3862fd3cad097a3f3363467b (diff)
downloadgdb-d9409498813c75c1a9e9287ac6e5100ed3130390.zip
gdb-d9409498813c75c1a9e9287ac6e5100ed3130390.tar.gz
gdb-d9409498813c75c1a9e9287ac6e5100ed3130390.tar.bz2
Add a testcase for PR ld/21529
PR ld/21529 * testsuite/ld-unique/pr21529.d: New file. * testsuite/ld-unique/pr21529.s: Likewise. * testsuite/ld-unique/unique.exp: Run *.d.
Diffstat (limited to 'ld/testsuite/ld-unique')
-rw-r--r--ld/testsuite/ld-unique/pr21529.d8
-rw-r--r--ld/testsuite/ld-unique/pr21529.s8
-rw-r--r--ld/testsuite/ld-unique/unique.exp7
3 files changed, 22 insertions, 1 deletions
diff --git a/ld/testsuite/ld-unique/pr21529.d b/ld/testsuite/ld-unique/pr21529.d
new file mode 100644
index 0000000..9a75a6a
--- /dev/null
+++ b/ld/testsuite/ld-unique/pr21529.d
@@ -0,0 +1,8 @@
+#ld: --oformat binary -e main
+#objdump: -s -b binary
+
+.*: file format binary
+
+Contents of section \.data:
+ 0000 .*
+#pass
diff --git a/ld/testsuite/ld-unique/pr21529.s b/ld/testsuite/ld-unique/pr21529.s
new file mode 100644
index 0000000..4570635
--- /dev/null
+++ b/ld/testsuite/ld-unique/pr21529.s
@@ -0,0 +1,8 @@
+ .type a, %gnu_unique_object
+a: .long 0
+ .size a, .-a
+
+ .type main,"function"
+ .global main
+main:
+ .dc.a a
diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp
index 61c070a..49d7925 100644
--- a/ld/testsuite/ld-unique/unique.exp
+++ b/ld/testsuite/ld-unique/unique.exp
@@ -35,7 +35,12 @@ if { ![supports_gnu_unique] } {
return
}
-run_dump_test "unique"
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
+foreach t $test_list {
+ # We need to strip the ".d", but can leave the dirname.
+ verbose [file rootname $t]
+ run_dump_test [file rootname $t]
+}
# We need a working compiler. (Strictly speaking this is
# not true, we could use target specific assembler files).