summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-04-13 23:19:58 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-04-13 23:19:58 +0000
commit227099002aebfa74ad3b967cdaee5a6604009995 (patch)
tree7af9b9d4421f627f6f9f4e639260580d5c3a2290 /ld/testsuite/ld-x86-64
parentca8c94dceb57ee3da816fe8cd7bb6f946c0ae6f8 (diff)
downloadbinutils-redhat-227099002aebfa74ad3b967cdaee5a6604009995.tar.gz
Set reloc_count to 0 for reloc sections
bfd/ 2012-04-13 Alan Modra <amodra@gmail.com> PR ld/13947 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for reloc sections. ld/testsuite/ 2012-04-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/13947 * ld-x86-64/x86-64.exp: Run pr13947. * ld-x86-64/pr13947.d: New file. * ld-x86-64/pr13947.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r--ld/testsuite/ld-x86-64/pr13947.d7
-rw-r--r--ld/testsuite/ld-x86-64/pr13947.s5
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
3 files changed, 13 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr13947.d b/ld/testsuite/ld-x86-64/pr13947.d
new file mode 100644
index 0000000000..c8af34d8e7
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr13947.d
@@ -0,0 +1,7 @@
+#ld: -shared --emit-relocs
+#readelf: -S --wide
+
+#failif
+#...
+ +\[ [0-9]\] .rela.rela.plt +RELA +[0-9a-f]+ +[0-9a-f]+ 0+ +.*
+#...
diff --git a/ld/testsuite/ld-x86-64/pr13947.s b/ld/testsuite/ld-x86-64/pr13947.s
new file mode 100644
index 0000000000..71928cbe13
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr13947.s
@@ -0,0 +1,5 @@
+ .text
+ .globl foo
+ .type foo, @function
+foo:
+ call bar@PLT
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 963e8e7bd3..27174d5094 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -205,6 +205,7 @@ run_dump_test "nogot2"
run_dump_test "discarded1"
run_dump_test "pr12718"
run_dump_test "pr12921"
+run_dump_test "pr13947"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return