http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50394
--- Comment #24 from Michael Meeks <michael.meeks at suse dot com> 2011-09-23 08:33:17 UTC --- > I can imagine that this sort of magic breaks with LTO. Is the solution as > simple as using non-LTO version of libgcc3_uno.so? I will try to take a look > how this is implemented. Great - so, we wouldn't loose much by having the bridge compiled without optimisation - it is ultimately used to map C++ -> Java or python so all performance is already shot by that stage ;-) bridges/source/cpp_uno/gcc3_linux_intel/call.s bridges/source/cpp_uno/gcc3_linux_x86-64/call.s are the places to dig - unfortunately there is -far- too much cut/paste going on in here, though we've done some work to try to share more IIRC. These snippets are used by cpp2uno.cxx - to build trampolines cf. 'codeSnippet' - which (I hope) should work fine, and by uno2cpp.cxx to invoke things eg. 'uno2cpp.cxx's callVirtualMethod - which has some fun assembler in each case. Does that help ?