mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
406b4ada55
Since GOTOFF relocations against IFUNC symbols must go through PLT, set PLT reference count to 1 for GOTOFF relocation. bfd/ PR ld/27998 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF relocation against IFUNC symbols. (_bfd_x86_elf_adjust_dynamic_symbol): Likewise. ld/ PR ld/27998 * testsuite/ld-i386/i386.exp: Run PR ld/27998 tests. * testsuite/ld-i386/pr27998a.d: New file. * testsuite/ld-i386/pr27998a.s: Likewise. * testsuite/ld-i386/pr27998b.d: Likewise. * testsuite/ld-i386/pr27998b.s: Likewise.
21 lines
349 B
ArmAsm
21 lines
349 B
ArmAsm
.text
|
|
.p2align 4
|
|
.type my_foo, @function
|
|
my_foo:
|
|
ret
|
|
.size my_foo, .-my_foo
|
|
.p2align 4
|
|
.type resolve_foo, @function
|
|
resolve_foo:
|
|
leal my_foo@GOTOFF(%eax), %eax
|
|
ret
|
|
.size resolve_foo, .-resolve_foo
|
|
.type foo, @gnu_indirect_function
|
|
.set foo,resolve_foo
|
|
.p2align 4
|
|
.globl bar
|
|
.type bar, @function
|
|
bar:
|
|
leal foo@GOTOFF(%eax), %eax
|
|
ret
|