aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-m68k.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-05-28 08:15:06 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-05-28 08:15:21 -0700
commitac98f9e2275ffcca560eaa0bddd282a1ff94fc28 (patch)
tree93151266d6d6817f64ef156a6dc3c523a206d4d2 /bfd/elf32-m68k.c
parent03fce1c78c01a9b0e30e91be60e7af717a10bb2c (diff)
downloadgdb-ac98f9e2275ffcca560eaa0bddd282a1ff94fc28.zip
gdb-ac98f9e2275ffcca560eaa0bddd282a1ff94fc28.tar.gz
gdb-ac98f9e2275ffcca560eaa0bddd282a1ff94fc28.tar.bz2
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.
Diffstat (limited to 'bfd/elf32-m68k.c')
-rw-r--r--bfd/elf32-m68k.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 8680504..70532c2 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -4589,26 +4589,6 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return TRUE;
}
-/* Hook called by the linker routine which adds symbols from an object
- file. */
-
-static bfd_boolean
-elf_m68k_add_symbol_hook (bfd *abfd,
- struct bfd_link_info *info,
- Elf_Internal_Sym *sym,
- const char **namep ATTRIBUTE_UNUSED,
- flagword *flagsp ATTRIBUTE_UNUSED,
- asection **secp ATTRIBUTE_UNUSED,
- bfd_vma *valp ATTRIBUTE_UNUSED)
-{
- if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
- && (abfd->flags & DYNAMIC) == 0
- && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
-
- return TRUE;
-}
-
#define TARGET_BIG_SYM m68k_elf32_vec
#define TARGET_BIG_NAME "elf32-m68k"
#define ELF_MACHINE_CODE EM_68K
@@ -4646,7 +4626,6 @@ elf_m68k_add_symbol_hook (bfd *abfd,
#define elf_backend_object_p elf32_m68k_object_p
#define elf_backend_grok_prstatus elf_m68k_grok_prstatus
#define elf_backend_grok_psinfo elf_m68k_grok_psinfo
-#define elf_backend_add_symbol_hook elf_m68k_add_symbol_hook
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1