http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48447
--- Comment #5 from Dave Korn <davek at gcc dot gnu.org> 2011-04-07 15:49:29 UTC --- Well, this is basically a weakness in the pass-through solution implemented for PR 42690; it only knows about the compilers stdlibs, and doesn't process any user-specified libs on the command line. In the general case that's how things ought to be: LTRANS only generates new references to builtins/libcalls, not any of the user's code. However when you use -nostdlib and pass libgcc as if it were a user library, as in case 3, the pass-through mechanism doesn't know that it's actually a compiler runtime rather than user library and doesn't pass it through. The correct fix is going to be in the linker, not the compiler, by implementing a second library scan pass and obsoleting the pass-through mechanism. I've got a revised version of that experimental patch that I'll attach to this PR for reference.