ld: Unify STT_GNU_IFUNC handling
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 28 May 2018 15:15:06 +0000 (08:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 28 May 2018 15:15:21 +0000 (08:15 -0700)
commitac98f9e2275ffcca560eaa0bddd282a1ff94fc28
tree93151266d6d6817f64ef156a6dc3c523a206d4d2
parent03fce1c78c01a9b0e30e91be60e7af717a10bb2c
ld: Unify STT_GNU_IFUNC handling

Take STT_GNU_IFUNC handling scattered across targets and gather it in
the generic ELF linker.

bfd/

PR ld/23238
* elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
* elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
(elf_backend_add_symbol_hook): Likewise.
* elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
(elf_backend_add_symbol_hook): Likewise.
* elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
(elf_backend_add_symbol_hook): Likewise.
* elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
* elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
(elf_backend_add_symbol_hook): Likewise.
* elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
handling.
* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
* elflink.c (elf_link_add_object_symbols): Set
elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.

ld/

PR ld/23238
* testsuite/ld-ifunc/ifunc-26.d: New file.
* testsuite/ld-ifunc/ifunc-26.s: Likewise.
* testsuite/ld-ifunc/ifunc.exp: Run *.d tests without a
working compiler.
18 files changed:
bfd/ChangeLog
bfd/elf-s390-common.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-m68k.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sparc.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elflink.c
bfd/elfxx-aarch64.c
bfd/elfxx-aarch64.h
ld/ChangeLog
ld/testsuite/ld-ifunc/ifunc-26.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-26.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc.exp
This page took 0.027912 seconds and 4 git commands to generate.