This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/15167: ld merges gnu_unique def and normal ref into normal symbol
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 22 Feb 2013 09:46:52 +1030
- Subject: Re: PATCH: PR ld/15167: ld merges gnu_unique def and normal ref into normal symbol
- References: <20130221194433.GA28526@intel.com>
On Thu, Feb 21, 2013 at 11:44:33AM -0800, H.J. Lu wrote:
> --- a/bfd/elflink.c
> +++ b/bfd/elflink.c
> @@ -4197,7 +4197,7 @@ error_free_dyn:
> h = (struct elf_link_hash_entry *) h->root.u.i.link;
>
> *sym_hash = h;
> - if (is_elf_hash_table (htab))
> + if (is_elf_hash_table (htab) && definition)
> h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
>
> new_weak = (flags & BSF_WEAK) != 0;
Let's move setting of h->unique_global down to where other flags are
set. Where h->target_internal is set looks ideal.
Also, why is h->unique_global being set in _bfd_elf_merge_symbol?
That doesn't look correct to me.
--
Alan Modra
Australia Development Lab, IBM