__la_symbol_ptr Mach-O section is no longer found after iOS 14.5

I'm using a library called fishhook to capture calls to __cxa_throw to capture better stack traces for C++ exceptions.

How it works is detailed in the link above, but its starting point is searching for "lazy symbol pointer table" or "non-lazy symbol pointer table" until it reaches the reference for __cxa_throw and replaces it with my implementation.

The problem is that starting iOS 14.5 it doesn't seem to find "lazy symbol pointer table" section in the Mach-O binaries for all system libraries (usually found in 80 out of 500+).

Pre-iOS 14.5:

Image .... /usr/lib/libc++.1.dylib

sect name: __got_weak in __DATA

sect name: __la_weak_ptr in __DATA

sect name: __got in __DATA_CONST

sect name: __la_symbol_ptr in __DATA_CONST

Post-iOS 14.5:

sect name: __got_weak in __DATA

sect name: __data in __DATA

sect name: __bss in __DATA

sect name: __common in __DATA

sect name: __got in __DATA_CONST

sect name: __const in __DATA_CONST

Answered by yhamza in 680362022

I found that the symbol __cxa_throw has been moved to __AUTH_CONST and it has found multiple non-lazy pointer symbol tables (__auth_got and __got).

But the implementation we had looked at in the last section found __got.

So I updated the implementation to look into segment __AUTH_CONST in section __auth_got

Accepted Answer

I found that the symbol __cxa_throw has been moved to __AUTH_CONST and it has found multiple non-lazy pointer symbol tables (__auth_got and __got).

But the implementation we had looked at in the last section found __got.

So I updated the implementation to look into segment __AUTH_CONST in section __auth_got

__la_symbol_ptr Mach-O section is no longer found after iOS 14.5
 
 
Q