http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48094
--- Comment #17 from Iain Sandoe <iains at gcc dot gnu.org> --- Created attachment 30514 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30514&action=edit proposed fix. So the problem here is that when we bind multiple objects together (each of which has an anonymous image_info section) LTO (unlike the system linker) doens't know that these should be coalesced - and, TBH, I doubt we're going to teach it about a darwin-specific section ... Luckily, the content of the image_info section only depends on command line flags. So this is a proposed solution. 1. allow the requisite ObjC flags to be recognized by lto1. 2. don't generate the image_info section in the FE instead .. 3. take note of the flag values, and (IFF there is some ObjC metadata present in the object) emit the image_info section from the back end. ==== I've checked that this flies on Darwin12 with XCode 4.6.3 [with lto enabled] - but I don't have the XCode 4.2 configuration on Darwin10. (it has also been tested on older versions of the tool-chain). ==== Mike - opinions on the solution? others: wider testing please