bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12762] lto produces multiple definition errors for all symbols (


From: amodra at gmail dot com
Subject: [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++
Date: Thu, 4 Aug 2011 23:28:02 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12762

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #17 from Alan Modra <amodra at gmail dot com> 2011-08-04 23:27:13 
UTC ---
OK, I've had a look at this PR again, comparing output from the mingw compiler
versus an ELF one.  The ELF gcc plugin has multiple copies of _ZTI1A and
similar symbols added via ld/plugin.c:add_symbols.  The difference is that the
ELF gcc makes them weak.  That's the reason why ld does not complain for ELF.

So this is probably a mingw gcc bug.

However, I now think a patch like the one Nick added here is quite safe.  An
even better version would be to modify bfd_section_already_linked to return a
bool saying whether the entry is already there.  That will save a lookup, and
allow the ELF/COFF versions to be different if necessary.  I'll code up a patch
to do that.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]