AnyPS5/core/libs/prx/libkernel/Module/src
mugurc 939c3d98f7 feat(libc): exception runtime on macOS hosts
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.
2026-10-08 13:16:41 +03:00
..
DynamicLoader.cpp build(windows): guard NOMINMAX before including windows.h 2026-10-06 14:57:48 +02:00
Module.cpp feat(libc): exception runtime on macOS hosts 2026-10-08 13:16:41 +03:00
ModuleInfo.cpp feat(libkernel): implement sceKernelGetModuleInfoFromAddr 2026-10-05 19:55:15 +02:00