A symbol visibility problem

Nick Clifton nickc@redhat.com
Wed Jan 28 11:33:00 GMT 2004


Hi H. J. Lu" <hjl@lucon.org> writes:

> The problem is
>
>       /* If the new symbol with non-default visibility comes from a
>          relocatable file and the old definition comes from a dynamic
>          object, we remove the old definition.  */
>       if ((*sym_hash)->root.type == bfd_link_hash_indirect)
>         h = *sym_hash;
>       h->root.type = bfd_link_hash_new;
>       h->root.u.undef.abfd = NULL;
>  
> If the new entry with non-default visibility is undefined, then
> setting the type to bfd_link_hash_new will lead to the
> assertion. Should we use
>
> 	h->root.type = bfd_link_hash_undefined;
>
> instead and let _bfd_generic_link_add_one_symbol take care of it?

That seems sensible, but I think only if the new symbol is undefined.

Do you have a patch to propose for this ?

Cheers
        Nick
        



More information about the Binutils mailing list