From a43942db49b07a457ee4f960d0f118b23641ec38 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Mon, 16 May 2016 08:51:26 +0100 Subject: LD/ELF: Unify STB_GNU_UNIQUE handling Take STB_GNU_UNIQUE handling scattered across targets and gather it in the generic ELF linker. Update test suite infrastructure accordingly. bfd/ * elf-s390-common.c (elf_s390_add_symbol_hook): Remove STB_GNU_UNIQUE handling. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise. * elf32-i386.c (elf_i386_add_symbol_hook): Remove function. (elf_backend_add_symbol_hook): Remove macro. * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols' for STB_GNU_UNIQUE symbols. binutils/ * testsuite/lib/binutils-common.exp (supports_gnu_unique): New procedure. * testsuite/binutils-all/objcopy.exp: Use `supports_gnu_unique' with the `strip-10' test. ld/ * testsuite/ld-unique/unique.exp: Use `is_elf_format' and `supports_gnu_unique' to qualify testing. --- bfd/ChangeLog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bfd/ChangeLog') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9f1bb70..57a8189 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,22 @@ +2016-05-17 Maciej W. Rozycki + + * elf-s390-common.c (elf_s390_add_symbol_hook): Remove + STB_GNU_UNIQUE handling. + * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. + * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise. + * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. + * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. + * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. + * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. + * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. + * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. + * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. + * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise. + * elf32-i386.c (elf_i386_add_symbol_hook): Remove function. + (elf_backend_add_symbol_hook): Remove macro. + * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols' + for STB_GNU_UNIQUE symbols. + 2016-05-16 Maciej W. Rozycki * elf32-v850.c (v850_elf_copy_notes): New function, factored out -- cgit v1.1