bb1cb422ae
bfd/ 2010-07-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11791 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support garbage collection against STT_GNU_IFUNC symbols. * elf32-i386.c (elf_i386_get_local_sym_hash): Don't set elf.plt.offset/elf.got.offset to -1. (elf_i386_tls_transition): Skip TLS transition for functions. (elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols. * elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set elf.plt.offset/elf.got.offset to -1. (elf64_x86_64_tls_transition): Skip TLS transition for functions. (elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols. ld/testsuite/ 2010-07-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11791 * ld-ifunc/ifunc-10-i386.d: New. * ld-ifunc/ifunc-10-i386.s: Likewise. * ld-ifunc/ifunc-10-x86-64.d: Likewise. * ld-ifunc/ifunc-10-x86-64.s: Likewise. * ld-ifunc/ifunc-11-i386.d: Likewise. * ld-ifunc/ifunc-11-i386.s: Likewise. * ld-ifunc/ifunc-11-x86-64.d: Likewise. * ld-ifunc/ifunc-11-x86-64.s: Likewise.
20 lines
426 B
ArmAsm
20 lines
426 B
ArmAsm
.section .text.foo,"ax",@progbits
|
|
.type foo, @function
|
|
foo:
|
|
.global foo
|
|
movl ifunc@GOT(%ecx), %eax
|
|
movl ifunc@GOTOFF(%ecx), %eax
|
|
call ifunc@PLT
|
|
call ifunc
|
|
ret
|
|
|
|
.section .text.bar,"ax",@progbits
|
|
.type bar, @function
|
|
bar:
|
|
.global bar
|
|
ret
|
|
|
|
.section .text.ifunc,"ax",@progbits
|
|
.type ifunc, @gnu_indirect_function
|
|
ifunc:
|
|
ret
|