This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #38 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-02-04 01:20:05 UTC ---
Actually, I think I see the problem here. Looking at how gcc-4.2 in Snow
Leopard links, I see...
gcc -v himenoBMTxpa.c
...
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/collect2 -dynamic -arch x86_64
-macosx_version_min 10.6.7 -weak_reference_mismatches non-weak -o a.out
-lcrt1.10.6.o -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../..
/var/folders/1C/1CdoNxmNFHyOIjNBLNuJh++++TM/-Tmp-//ccbmcsLd.o -lSystem -lgcc
-lSystem

whereas for current gcc trunk we have...

 /Users/howarth/dist/libexec/gcc/x86_64-apple-darwin10.7.0/4.6.0/collect2
-dynamic -arch x86_64 -macosx_version_min 10.6.7 -weak_reference_mismatches
non-weak -o a.out -lcrt1.10.5.o
-L/Users/howarth/dist/lib/gcc/x86_64-apple-darwin10.7.0/4.6.0
-L/Users/howarth/dist/lib/gcc/x86_64-apple-darwin10.7.0/4.6.0/../../..
/var/folders/1C/1CdoNxmNFHyOIjNBLNuJh++++TM/-Tmp-//ccZYYQup.o -lgcc_ext.10.5
-lgcc -no_compact_unwind -lSystem -v

So we get the wrong unwinder in xplor-nih with -flat_namepace because, while
libgcc_ext.10.5.dylib doesn't export the unwinder symbols, -lgcc will cause
/Users/howarth/dist/lib/gcc/x86_64-apple-darwin10.7.0/4.6.0/libgcc.a to provide
them. In particular, I see the symbol for ___enable_execute_stack in the FSF
libgcc.a. So what we should do is insure that FSF gcc 4.6 produces the same
sort of linkage as Apple's gcc-4.2. That is...

-lgcc_ext.10.5  -lSystem -lgcc -no_compact_unwind -lSystem

This would avoid the need for reverting r163267.

ps If I recall correctly, the Apple developers told me that they do eventually
intend to get rid of the linkage on -lgcc. Maybe that will happen in 10.7.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]