• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
incompatible libstdc++.6 and libSystem.B
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incompatible libstdc++.6 and libSystem.B


  • Subject: incompatible libstdc++.6 and libSystem.B
  • From: Jörg Richter <email@hidden>
  • Date: Wed, 28 Oct 2009 20:47:38 +0100

Hi,

I am developing an C++ application on 10.5. But I use a custom built FSF GCC 4.4.1.
Because I want to target >=10.4 I built with this flags:
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/ Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4


The application is running fine on 10.4 and 10.5, but not on 10.6.
It dumps core as soon as an exception is thrown. This is the top of the
stack, when it happens:

0 libstdc++.6.dylib 0x01df849b __cxa_throw + 59
1 libSystem.B.dylib 0x984fab70 _Unwind_GetIP + 32
2 libstdc++.6.dylib 0x01df7d01 __gxx_personality_v0 + 287
3 libgcc_s.1.dylib 0x01f10f74 _Unwind_RaiseException + 148
4 libstdc++.6.dylib 0x01df84e0 __cxa_throw + 128


libstdc++ and libgcc_s are from my custom built GCC. libSystem.B from 10.6.
As you can see, frame 2 (__gxx_personality_v0) calls into libSystem.B.dylib (_Unwind_GetIP).
I think this should not happen because they are not compatible.
Only 10.6 has _Unwind_GetIP in libSystem.B.dylib


But doing nm on libSystem I get this symbols:
0019f9b8 S $ld$hide$os10.4$__Unwind_GetIP
0019f9b9 S $ld$hide$os10.5$__Unwind_GetIP
0006fb50 T __Unwind_GetIP

I think the $ld$hide$os10.4$ prefix means, that this function should not be considered
when loading a program targeted for 10.4. But it obviously is. This is where I got stuck.


How does the dynamic linker know which OS version a program was built for?
Can this be queried from the command-line? I *think* otool should do it, but I was unable to
find it in its output.


Are the above options enough to request 10.4 compatibility?

Thanks for your help,
   Jörg

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: tracking io from dynamic library code page-ins
  • Next by Date: F_GLOBAL_NOCACHE not global?
  • Previous by thread: tracking io from dynamic library code page-ins
  • Next by thread: F_GLOBAL_NOCACHE not global?
  • Index(es):
    • Date
    • Thread