aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-27 14:45:41 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-27 14:45:41 +0000
commitde687b11fbe1ce0c516f1944590f08bb445ba6ff (patch)
tree4a161f32f1fd4c202ad865e4824181a70d71dac2 /ld
parentf5eda4731e902851d30f1bd99fa890d2a7de41b9 (diff)
downloadgdb-de687b11fbe1ce0c516f1944590f08bb445ba6ff.zip
gdb-de687b11fbe1ce0c516f1944590f08bb445ba6ff.tar.gz
gdb-de687b11fbe1ce0c516f1944590f08bb445ba6ff.tar.bz2
Add a test for PR ld/14170
PR ld/14170 * ld-elf/elf.exp: Add a test for PR ld/14170. * ld-elf/pr14170a.s: New file. * ld-elf/pr14170b.s: Likewise. * ld-elf/pr14170b.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-elf/elf.exp8
-rw-r--r--ld/testsuite/ld-elf/pr14170a.s11
-rw-r--r--ld/testsuite/ld-elf/pr14170b.s11
-rw-r--r--ld/testsuite/ld-elf/pr14170c.s2
5 files changed, 41 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 1b30b3b..2a2bea2 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/14170
+ * ld-elf/elf.exp: Add a test for PR ld/14170.
+
+ * ld-elf/pr14170a.s: New file.
+ * ld-elf/pr14170b.s: Likewise.
+ * ld-elf/pr14170b.s: Likewise.
+
2012-05-26 Alan Modra <amodra@gmail.com>
* ld-srec/srec.exp: Remove powerpc64 flag setting.
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index eb909bc..f14498f 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -66,6 +66,14 @@ if { ![istarget hppa64*-hpux*] } {
#
# Only run the test on targets thats support creating shared libraries.
if { [check_shared_lib_support] } then {
+ run_ld_link_tests {
+ {"Build pr14170a.o" "" "" "pr14170a.s" {} "pr14170.a" }
+ {"Build shared library for pr14170"
+ "-shared" "" "pr14170b.s" {} "pr14170.so" }
+ {"PR ld/14170"
+ "tmpdir/pr14170a.o tmpdir/pr14170.so" "" "pr14170c.s"
+ { } "a.out" }
+ }
setup_xfail "tic6x-*-*"
run_ld_link_tests {
{"Build shared library for next test"
diff --git a/ld/testsuite/ld-elf/pr14170a.s b/ld/testsuite/ld-elf/pr14170a.s
new file mode 100644
index 0000000..6c01cae
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14170a.s
@@ -0,0 +1,11 @@
+
+ .global start /* Used by SH targets. */
+start:
+ .global _start
+_start:
+ .global __start
+__start:
+ .global main /* Used by HPPA targets. */
+main:
+ .dc.a foo
+ .dc.a bar
diff --git a/ld/testsuite/ld-elf/pr14170b.s b/ld/testsuite/ld-elf/pr14170b.s
new file mode 100644
index 0000000..818f975
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14170b.s
@@ -0,0 +1,11 @@
+ .data
+ .type foo,%object
+ .globl foo
+foo:
+ .dc.a 0
+ .size foo, . - foo
+ .type foo,%object
+ .globl bar
+bar:
+ .dc.a 0
+ .size bar, . - bar
diff --git a/ld/testsuite/ld-elf/pr14170c.s b/ld/testsuite/ld-elf/pr14170c.s
new file mode 100644
index 0000000..a47b67b
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr14170c.s
@@ -0,0 +1,2 @@
+ .hidden foo
+ .comm foo,4,4