aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/pr24905.s
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-08-16 14:25:15 -0700
committerH.J. Lu <hjl.tools@gmail.com>2019-08-16 14:25:58 -0700
commit81e8046dc0daaf56fb10b11931fc77600a4b5920 (patch)
tree1068ed32d4fc01ea11136b4f2ba7990715703f3d /ld/testsuite/ld-x86-64/pr24905.s
parent398fdd6086a290748afcce0efabaebb4e363278c (diff)
downloadgdb-81e8046dc0daaf56fb10b11931fc77600a4b5920.zip
gdb-81e8046dc0daaf56fb10b11931fc77600a4b5920.tar.gz
gdb-81e8046dc0daaf56fb10b11931fc77600a4b5920.tar.bz2
x86-64: Move PIC check for PC-relative relocations back
commit 83924b3846361f2f76f9a6e7b5afa01c0eebbd4f Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Feb 5 18:45:23 2019 -0800 x86-64: Restore PIC check for PCREL reloc against protected symbol moved PIC check for PC-relative relocations to elf_x86_64_check_relocs. Since linker defined symbols may not be processed at the time, we need to move the check back to elf_x86_64_relocate_section. bfd/ PR ld/24905 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for PC-relative relocations back to ... (elf_x86_64_relocate_section): Here. ld/ PR ld/24905 * testsuite/ld-x86-64/pr24905-x32.d: New file. * testsuite/ld-x86-64/pr24905.d: Likewise. * testsuite/ld-x86-64/pr24905.s: Likewise. * testsuite/ld-x86-64/pr24905.t: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr24905 and pr24905-x32.
Diffstat (limited to 'ld/testsuite/ld-x86-64/pr24905.s')
-rw-r--r--ld/testsuite/ld-x86-64/pr24905.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr24905.s b/ld/testsuite/ld-x86-64/pr24905.s
new file mode 100644
index 0000000..73a5d58
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr24905.s
@@ -0,0 +1,6 @@
+ .text
+ .globl foo
+ .type foo, @function
+foo:
+ leaq EXTERNAL_SYM(%rip), %rdi
+ .hidden EXTERNAL_SYM