|
From: | Michael Gardner |
Subject: | Re: Crash with new-style exceptions on FreeBSD amd64 |
Date: | Thu, 15 Mar 2007 16:46:22 -0500 |
On 3/15/07, Andrew Pinski <address@hidden> wrote:
On 3/15/07, Michael Gardner <address@hidden> wrote: > That bug's description doesn't seem to match the symptoms I'm seeing, > and it's reported against gcc 4.3 rather than 4.1. For one, it is the same symptom, in that we are not linking against the shared libgcc which the driver does automatically for objective-C files if it is sees a .m. Try adding -shared-libgcc to the link line and see if that works. Again what is the ouput of ldd because that will tell me what is really happening?
Adding -shared-libgcc to the link step worked! It looks to me like both versions are using the same libgcc, except in the first case libgcc is listed before libc: $ gcc41 -shared-libgcc -fobjc-exceptions -fexceptions -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lobjc -lgnustep-base -o main-with-shared-libgcc main.o $ ./main-with-shared-libgcc caught! $ ldd main-with-shared-libgcc main-with-shared-libgcc: libobjc.so.1 => /usr/local/lib/gcc-4.1.3/libobjc.so.1 (0x800631000) libgnustep-base.so.1.13 => /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.13 (0x80074c000) libgcc_s.so.1 => /usr/local/lib/gcc-4.1.3/libgcc_s.so.1 (0x800c94000) libc.so.6 => /lib/libc.so.6 (0x800da0000) libgmp.so.7 => /usr/local/lib/libgmp.so.7 (0x800fb1000) libxslt.so.2 => /usr/local/lib/libxslt.so.2 (0x8010eb000) libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x801221000) libz.so.3 => /lib/libz.so.3 (0x801462000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x801576000) libm.so.4 => /lib/libm.so.4 (0x801767000) libkvm.so.3 => /lib/libkvm.so.3 (0x801883000) $ gcc41 -fobjc-exceptions -fexceptions -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lobjc -lgnustep-base -o main-no-shared-libgcc main.o $ ./main-no-shared-libgcc Abort trap: 6 (core dumped) $ ldd main-no-shared-libgcc main-no-shared-libgcc: libobjc.so.1 => /usr/local/lib/gcc-4.1.3/libobjc.so.1 (0x800635000) libgnustep-base.so.1.13 => /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.13 (0x800750000) libc.so.6 => /lib/libc.so.6 (0x800c98000) libgcc_s.so.1 => /usr/local/lib/gcc-4.1.3/libgcc_s.so.1 (0x800ea9000) libgmp.so.7 => /usr/local/lib/libgmp.so.7 (0x800fb5000) libxslt.so.2 => /usr/local/lib/libxslt.so.2 (0x8010ef000) libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x801225000) libz.so.3 => /lib/libz.so.3 (0x801466000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x80157a000) libm.so.4 => /lib/libm.so.4 (0x80176b000) libkvm.so.3 => /lib/libkvm.so.3 (0x801887000) -Michael
[Prev in Thread] | Current Thread | [Next in Thread] |