------- Comment #3 from davek at gcc dot gnu dot org 2010-04-28 23:49 ------- (In reply to comment #2) > Quoting RG from the gcc list: > > "[ ... ] Or you fix collect2 to do processing of archives and hand > lto1 the required information (it expects archive components > with LTO bytecode like archiv...@offset with offset being the > offset of the .o file with LTO bytecode inside the archive). See > lto/lto-elf.c:lto_obj_file_open for "details"."
Of course, without unresolved symbol info to guide us, as the linker has, we won't know which archive members would be required in a link. So if we do try this in collect2, it would need to effectively recompile the entire library at link time. Ow. I think we need to get LD to help us out here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41376