ld fix for STB_GNU_UNIQUE PR10549
Alan Modra
amodra@gmail.com
Sat Apr 9 14:37:00 GMT 2011
On Thu, Apr 07, 2011 at 10:01:01PM +0200, Mark Wielaard wrote:
> @@ -15229,9 +15229,10 @@ elf32_arm_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
> Elf_Internal_Sym *sym, const char **namep,
> flagword *flagsp, asection **secp, bfd_vma *valp)
> {
> - if ((abfd->flags & DYNAMIC) == 0
> - && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
> - elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE;
> + if (((abfd->flags & DYNAMIC) == 0
> + && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
> + || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
> + elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
This looks odd. Why should an STB_GNU_UNIQUE symbol in a dynamic
object, perhaps not even referenced, result in the current linker
output being marked with has_gnu_symbols?
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list