[Top][All Lists]
[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.
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, (continued)
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, nickc at redhat dot com, 2011/08/01
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, xunxun1982 at gmail dot com, 2011/08/01
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, xunxun1982 at gmail dot com, 2011/08/01
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, amodra at gmail dot com, 2011/08/01
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, amodra at gmail dot com, 2011/08/01
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, amodra at gmail dot com, 2011/08/01
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, nickc at redhat dot com, 2011/08/02
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, amodra at gmail dot com, 2011/08/02
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, steve at sk2 dot org, 2011/08/03
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, vanboxem.ruben at gmail dot com, 2011/08/03
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++,
amodra at gmail dot com <=
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, cvs-commit at gcc dot gnu.org, 2011/08/04
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, amodra at gmail dot com, 2011/08/04
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, hjl.tools at gmail dot com, 2011/08/08
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, cvs-commit at gcc dot gnu.org, 2011/08/09
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, cvs-commit at gcc dot gnu.org, 2011/08/16
- [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++, vanboxem.ruben at gmail dot com, 2011/08/25