aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-11-13 11:07:31 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-11-13 11:09:40 -0800
commit553d1284b7820ebc88a2e9500d813441c642bdc9 (patch)
tree18b80b0c803e11ae159d05b588c2bef38cde6b34 /ld
parent5784b3caf8e2d55339994067e7f05dd047109b87 (diff)
downloadgdb-553d1284b7820ebc88a2e9500d813441c642bdc9.zip
gdb-553d1284b7820ebc88a2e9500d813441c642bdc9.tar.gz
gdb-553d1284b7820ebc88a2e9500d813441c642bdc9.tar.bz2
Add assembler support for @gotplt
Obsolete R_X86_64_GOTPLT64 and treat it the same as R_X86_64_GOT64. bfd/ PR gas/17598 * elf64-x86-64.c (elf_x86_64_check_relocs): Treat R_X86_64_GOTPLT64 the same as R_X86_64_GOT64. (elf_x86_64_relocate_section): Likewise. gas/ PR gas/17598 * config/tc-i386.c (reloc): Support BFD_RELOC_X86_64_GOTPLT64. gas/testsuite/ PR gas/17598 * gas/i386/reloc64.s: Add @gotplt check. * gas/i386/reloc64.d: Updated. * gas/i386/reloc64.l: Likewise. ld/testsuite/ PR gas/17598 * ld-x86-64/x86-64.exp: Run gotplt1. * ld-x86-64/gotplt1.d: New file. * ld-x86-64/gotplt1.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-x86-64/gotplt1.d6
-rw-r--r--ld/testsuite/ld-x86-64/gotplt1.s5
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
4 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index dddada5..4d78aab 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/17598
+ * ld-x86-64/x86-64.exp: Run gotplt1.
+
+ * ld-x86-64/gotplt1.d: New file.
+ * ld-x86-64/gotplt1.s: Likewise.
+
2014-11-11 Jiong Wang <jiong.wang@arm.com>
* lib/ld-lib.exp (run_ld_link_exec_tests): Append board_cflags if gcc
diff --git a/ld/testsuite/ld-x86-64/gotplt1.d b/ld/testsuite/ld-x86-64/gotplt1.d
new file mode 100644
index 0000000..f2ee245
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/gotplt1.d
@@ -0,0 +1,6 @@
+#as: --64
+#ld: -shared -melf_x86_64
+#readelf: -r --wide
+
+#...
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_GLOB_DAT +[0-9a-f]+ +foo \+ 0
diff --git a/ld/testsuite/ld-x86-64/gotplt1.s b/ld/testsuite/ld-x86-64/gotplt1.s
new file mode 100644
index 0000000..0675843
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/gotplt1.s
@@ -0,0 +1,5 @@
+ .globl _start
+ .type _start, @function
+_start:
+ movabsq $foo@GOTPLT, %rax
+ .size _start, .-_start
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 54786a7..a9b68ff 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -227,6 +227,7 @@ run_dump_test "pr12570a"
run_dump_test "pr12570b"
run_dump_test "pr14215"
run_dump_test "pr14207"
+run_dump_test "gotplt1"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return