This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/15167: ld merges gnu_unique def and normal ref into normal symbol


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]