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

Alan Modra amodra@gmail.com
Thu Feb 21 23:17:00 GMT 2013


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



More information about the Binutils mailing list