http://sourceware.org/bugzilla/show_bug.cgi?id=13244
Bug #: 13244 Summary: GNU LD incorrectly complain about undefined hidden symbols with LTO Product: binutils Version: 2.23 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sourceware.org ReportedBy: hubi...@gcc.gnu.org Classification: Unclassified Created attachment 5957 --> http://sourceware.org/bugzilla/attachment.cgi?id=5957 Mozilla source file that produces the UNDEF load. Mozilla does not link with GNU LD with the following error: /abuild/jh/trunk-install/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-gnu/bin/ld: libxul.so: hidden symbol `_mm_load_si128' isn't defined /abuild/jh/trunk-install/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-gnu/bin/ld: final link failed: Bad value What happens is approximately the following: 1) _mm_load_si128 is extern inline function that is assumed to be always inlined and thus it has no non-extern inline definition in the whole DSO. It is also always inline, so it is OK. 2) GCC delays removal of extern inlines and virtual functions from callgraph until after IPA inlining. This is in order to increase chances that they will be inlined when their call is discovered later via devirtualization or when address is taken 3) Symbol streaming outputs the symbols based at calgraph. Even though the function was fully inlined, the kept external body makes it to output use of _mm_load_si128 symbol 4) In resolution table we get: 974 314cd963 UNDEF _mm_load_si128 but the refrence to _mm_load_si28 is optimized out at linktime. The linker ought to not complain about the hidden symbol reference that has been optimized out. At least gold behaves this way. I am going to fix 3) at GCC side, but se still ought not to complain at 4). Honza -- 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-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils