+++ This bug was initially created as a clone of Bug #47247 +++ Current linker plugin specification has problem with mixed IR/non-IR inputs. When a function, foo, in IR input is only called from non-IR input, LTO thinks foo is never called and optimizes it out. See: http://sourceware.org/bugzilla/show_bug.cgi?id=12430 LTO API should have a way for linker to inform LTO that a symbol is referenced from non-IR input.
It is a linker bug, which has been fixed.
How it was fixed?
(In reply to comment #2) > How it was fixed? It is very trivial. Linker just needs to add the object-only file to input file list: http://git.kernel.org/?p=devel/binutils/hjl/x86.git;a=patch;h=31ef643b40d1fe0953d2acf465d06d9175b56b79