diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-11-14 10:13:03 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-11-14 10:13:03 -0800 |
commit | 9d734efa1034d266249751978f95a686ec9d19c6 (patch) | |
tree | de4ee5005311f667ecf988c38819711f7277f145 /ld/testsuite/ld-x86-64/pr20800a.S | |
parent | 35fd2ddeb1d90f1750401cfb6d01fe055656b88d (diff) | |
download | gdb-9d734efa1034d266249751978f95a686ec9d19c6.zip gdb-9d734efa1034d266249751978f95a686ec9d19c6.tar.gz gdb-9d734efa1034d266249751978f95a686ec9d19c6.tar.bz2 |
Also check GOT PLT for R_X86_64_PLTOFF64
Since "-z now" replaces PLT with GOT PLT, we should also check GOT PLT
for R_X86_64_PLTOFF64 relocation.
bfd/
PR ld/20800
* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
plt_got.offset for R_X86_64_PLTOFF64.
ld/
PR ld/20800
* testsuite/ld-x86-64/pr20800a.S: New file.
* testsuite/ld-x86-64/pr20800b.S: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/20800 test.
Diffstat (limited to 'ld/testsuite/ld-x86-64/pr20800a.S')
-rw-r--r-- | ld/testsuite/ld-x86-64/pr20800a.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr20800a.S b/ld/testsuite/ld-x86-64/pr20800a.S new file mode 100644 index 0000000..c4bcd80 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr20800a.S @@ -0,0 +1,17 @@ + .text + .globl main + .type main, @function +main: +.L2: + leaq .L2(%rip), %rax + movabsq $_GLOBAL_OFFSET_TABLE_-.L2, %r11 + movabsq $bar@PLTOFF, %rdx + pushq %r15 + addq %r11, %rax + movq %rax, %r15 + addq %rax, %rdx + call *%rdx + xorl %eax, %eax + popq %r15 + ret + .size main, .-main |