http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55693
--- Comment #26 from Jack Howarth <howarth at nitro dot med.uc.edu> 2013-01-23 16:44:51 UTC --- Iain, The initial comments from the darwin linker developer were... That test case is dying because a.out contains its own copy of __cxa_allocate_exception which just returns NULL. How was a.out built? It looks like it linked with some bogus static copy of the libc++ runtime. Are you expecting that because these bogus cxa functions are weak, they will be overridden at runtime by the real version? Weak linking does not work quite that way on darwin. For performance, the only symbols which dyld checks for weak coalescing are those which the static linker marked as needing weak binding. You can see those with "dyldinfo -weak_bind". In a.out __cxa_allocate_exception is marked for weak binding check, but in libc++abi.dylib does not mark those as weak, so dyld is not coalescing those symbols and the a.out wind up running with its own bogus implementation. Can you just not link a.out with the bogus implementation?