mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-18 23:03:29 +08:00
5db4f0d383
Since something like ".long foo - ." may be used as pointer, we make sure that PLT is used if foo is a function defined in a shared library. bfd/ PR ld/19031 * elf64-x86-64.c (elf_x86_64_check_relocs): Set pointer_equality_needed for R_X86_64_PC32 reloc in non-code sections. ld/testsuite/ PR ld/19031 * ld-x86-64/x86-64.exp: Run PR ld/19031 test. * ld-x86-64/pr19031.out: New file. * ld-x86-64/pr19031a.c: Likewise. * ld-x86-64/pr19031b.S: Likewise. * ld-x86-64/pr19031c.c: Likewise.
19 lines
199 B
ArmAsm
19 lines
199 B
ArmAsm
.text
|
|
.globl g
|
|
.type g, @function
|
|
g:
|
|
movq f@GOTPCREL(%rip), %rax
|
|
retq
|
|
|
|
.globl h
|
|
.type h, @function
|
|
h:
|
|
leaq zed, %rax
|
|
movslq zed, %rbx
|
|
addq %rbx, %rax
|
|
retq
|
|
|
|
.data
|
|
zed:
|
|
.long f - .
|