If you compile this file p3.cxx:
class foobarclass
{
public:
int i0;
};
void otherfun(void);
void mumble(void);
void fun(void)
{
try {
otherfun();
} catch(foobarclass &e) {
mumble();
}
}
Like this:
xcrun clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -fexceptions -c p3.cxx -p3.64.o
and
xcrun clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -fexceptions -c p3.cxx -o p3.32.o
and then check the symbol of the "typeinfo for foobarclass":
nm -m p3.64.o|grep ZTI
0000000000000110 (__DATA,__datacoal_nt) weak private external __ZTI11foobarclass
nm -m p3.32.o|grep ZTI
00000134 (__DATA,__datacoal_nt) weak external __ZTI11foobarclass
Why is the symbol weak private external in the arm64 case? This means dlsym() won't find it at run-time. This breaks certain low-level stuff in the LibreOffice codebase.
I asked the same question in the relevant Apple Developer forum, and got the reply that this is intentional, to reduce the number of globally visible symbols in an executable. So I will just have to live with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With