mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
On macOS the host keeps libc++abi: libc++ binds __cxa_throw two-level, so moving only the personality into this runtime would leave the two halves disagreeing on the exception header. The host personalities stay libc++abi's and libunwind's, and libc.prx serves guest code: - the guest's libstdc++ std::exception_ptr is modelled directly, since libc++'s differs, and the Itanium type_info layouts that libc++abi keeps private are declared for the runtime; - guest frames are found through their PT_GNU_EH_FRAME, using a dl_iterate_phdr emulation over the ELF program headers that relinked images keep in __APS5DATA,__meta (written by relinker --macos, which comes in a later pull request); - host frames are found by scanning __TEXT,__eh_frame; - sceKernelGetModuleInfoForUnwind uses the same emulation and falls back to dladdr for host images. The libc++ paths compile only with libc++/libc++abi and the rest only on __APPLE__, so Linux and Windows builds are unchanged. exception_c_cleanup throws from host code, which this runtime does not serve on macOS, so it is not built there.