https://sourceware.org/bugzilla/show_bug.cgi?id=21074

Cary Coutant <ccoutant at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from Cary Coutant <ccoutant at gmail dot com> ---
>   As for what to do about the problem, I am still pondering.  The ELF spec
> says:
> 
>    "When the link editor combines several relocatable object files,
>     it does not allow multiple definitions of STB_GLOBAL symbols with 
>     the same name."
> 
>   But, in this particular case what we really have is a repeated definition
> of the same symbol.  It would be much cleaner, IMHO, if GOLD did not create
> them in the first place.  But this might be hard to achieve.  (I am not a
> GOLD expert).  So maybe the bfd linker would be better off just filtering
> out duplicate symbols.  Hence the desire for a test case to help examine the
> situation.

Gold should clearly not be generating the duplicate symbols, so I don't think
you should change ld to accept them.

However, note that the commit identified is not the one causing the duplicate
symbols, but simply one that makes them section-relative rather than absolute.
Apparently, ld is fine with duplicate absolute symbols, but it's not fine with
duplicate relative symbols. Seems to me you should fix ld so it does diagnose
the duplicate symbols in the absolute case. It should at least be consistent.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to