http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53831
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-03 10:52:42 UTC --- (In reply to comment #3) > I don't think linker can do much after gcc removes the symbol from symtab. I belive the contract between the linker and GCC is that GCC can introduce new references to externally visible symbols and remove references and defs of symbols that are only used from inside the executable (the linker tells GCC that fact). The question is who is at fault here - GCC doing something it may not do or the linker not handling a situation it should handle. > BTW it would help a lot if linker verified that LTO and ELF symtabs actually > match. Currently mismatches causes all sorts or weird errors which are > somewhat > hard to understand without getting your hands dirty. True ... debugging LTO issues can be quite painful.