[Bug target/47558] 163267 breaks exception traceback in xplor-nih

howarth at nitro dot med.uc.edu gcc-bugzilla@gcc.gnu.org
Fri Feb 4 11:02:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47558

--- Comment #52 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-02-04 11:02:02 UTC ---
ain,
    I think the key misassumption you are making is that the internal linker
and dyld behavior for 10.5 is valid under 10.6. Remember that unlike under
Leopard, where /usr/lib/libgcc_s.1.dylib is still a physically unique file...

[MacPro:Leopard HD/usr/lib] howarth% ls -l libgcc*
lrwxr-xr-x  1 howarth  howarth      16 Jul 24  2009 libgcc_s.1.0.dylib ->
libgcc_s.1.dylib
-rw-r--r--  1 howarth  howarth  264016 Oct  6  2007 libgcc_s.1.dylib
-rw-r--r--  1 howarth  howarth   33256 Feb 19  2008 libgcc_s.10.4.dylib
-rw-r--r--  1 howarth  howarth   33620 Feb 19  2008 libgcc_s.10.5.dylib
lrwxr-xr-x  1 howarth  howarth      16 Jul 24  2009 libgcc_s_ppc64.1.dylib ->
libgcc_s.1.dylib
lrwxr-xr-x  1 howarth  howarth      16 Jul 24  2009 libgcc_s_x86_64.1.dylib ->
libgcc_s.1.dylib

under 10.6, it is only a symlink for libSystem itself...

[MacPro:/usr/lib] howarth% ls -l libgcc*
lrwxr-xr-x  1 root  wheel     17 Nov  4 19:37 libgcc_s.1.dylib ->
libSystem.B.dylib
lrwxr-xr-x  1 root  wheel     19 Nov  4 20:32 libgcc_s.10.4.dylib ->
libgcc_s.10.5.dylib
-rwxr-xr-x  1 root  wheel  40668 Apr 23  2010 libgcc_s.10.5.dylib

So under -mmacosx-version-min=10.6, the linker and dyld only have to use the
magic symbols to properly disregard the duplicate symbols in the
libgcc_s.*.dylib symlinks. When these changes were designed, Apple likely
didn't consider that someone would come along with an additional
libgcc_s.1.dylib and start linking that in as well. We need to treat the
linkage of -lgcc_ext.10.5 under -mmacosx-version-min=10.6 as in the same
category as the linkage of -lgcc and wrapper it with -lSystem as well,



More information about the Gcc-bugs mailing list