This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld fix for STB_GNU_UNIQUE PR10549
- From: Alan Modra <amodra at gmail dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: binutils at sourceware dot org, Nick Clifton <nickc at redhat dot com>, Ulrich Drepper <drepper at gmail dot com>
- Date: Sun, 10 Apr 2011 00:07:22 +0930
- Subject: Re: ld fix for STB_GNU_UNIQUE PR10549
- References: <1302206461.3358.8.camel@springer.wildebeest.org>
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