mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-18 23:03:29 +08:00
9d734efa10
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.
18 lines
273 B
ArmAsm
18 lines
273 B
ArmAsm
.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
|