Open Quuxplusone opened 10 years ago
Bugzilla Link | PR19222 |
Status | NEW |
Importance | P normal |
Reported by | Ivan Garramona (heavenandhell171@gmail.com) |
Reported on | 2014-03-21 13:08:08 -0700 |
Last modified on | 2016-05-14 14:05:41 -0700 |
Version | trunk |
Hardware | All All |
CC | compnerd@compnerd.org, hlandau@devever.net, llvm-bugs@lists.llvm.org, rafael@espindo.la |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
I believe i've figured whats happening. The problem is not specific to
"_S_construct" or -Os. The problem is that the weak symbols generated by Clang,
have different section names than the ones generated by GCC. This is causing
incompatibilities.
Clang generate simple section names, like: .rdata or .text.
GCC generate sections like: .section$SymbolName. Note: The symbol name doesn't
have the '_' global prefix.
For example, this is one of the many multiple definitions i've got while trying
to build wxWidgets.
Original output:
.section .rdata,"r",discard,_IID_IShellItem
Should be:
.section .rdata$IID_IShellItem,"r",discard,_IID_IShellItem
This incompatibility may have been introduced by r195798 (to fix PR17918).
Also experiencing this issue. Here's a minimal test case which demonstrates the linker errors:
https://gist.github.com/hlandau/f6d77b2778e87a6d859940822775b8ca