AnyPS5/core/libs/prx/libkernel
jeffrey12cali 34616c425b fix(module): resolve the default dlsym scope against guest exports only
Titles pass handle 0 (RTLD_DEFAULT) for a process-wide lookup, and the loader rejected it: the handle is
not in the module map, so every such lookup failed even when a loaded module exports the symbol. Handle 0
and -2 now take the default scope, searching the global modules by plain name, NID and `#guest` form, and
then the process-wide scope.

The process-wide scope of the real loader also contains glibc and libstdc++, so an unfiltered fallback
would answer `malloc`, `dlopen` and `pthread_create` where PS5 reports the symbol as missing: handle 0 is
the main program, whose lookup sees the program's exports, not the host C++ runtime. A result from the
process scope is therefore accepted only when `dladdr` attributes it to a converted or replacement module
(a `.prx` library or the executable), which keeps the fallback for guest symbols and removes the host
leak. `guest_dynamic_loader` asserts the three host names are not found; disabling the filter makes that
test fail.

The scripting heap that an earlier revision of this branch added has been dropped: the title reaches the
same boot milestone with the lookup failing honestly, so the export was an inference rather than a
requirement, and prosper's bring-up notes report `ESRCH` for that name on hardware.
2026-10-08 14:30:55 +02:00
..
Aio/src feat(libs): declare the exports PPSA14632 imports that no library provides 2026-10-07 07:10:13 +02:00
AppMetadata fix(libSceAppContent): read user defined app params from param.json 2026-10-08 07:49:16 +02:00
Apr fix(libkernel): report AMPR completion events with the AMPR filter 2026-10-07 19:37:40 -04:00
DirectMemory Merge pull request #1370 from gjonn/fix/kernel-fixed-map-replaces-overlap 2026-10-08 22:35:53 +13:00
Equeue fix(libkernel): report AMPR completion events with the AMPR filter 2026-10-07 19:37:40 -04:00
EventFlag/src feat(runtime): timed waits, sync primitive fixes, heap and RTC fixes, unattended-run switches 2026-09-26 19:00:39 -07:00
File fix(libkernel): flush only the paths the guest changed in sceKernelSync on Windows 2026-10-08 08:27:22 +00:00
Module/src fix(module): resolve the default dlsym scope against guest exports only 2026-10-08 14:30:55 +02:00
Pthread Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/kernel-raise-exception-windows 2026-10-07 21:23:46 +02:00
Semaphore Merge pull request #315 from RomainROCH/codex/fix-semaphore-overflow 2026-10-04 14:01:19 +13:00
Socket Merge pull request #1279 from TheAggie/fix/libkernel-send-nosignal 2026-10-08 12:58:28 +02:00
SyncOnAddress/src feat(libkernel): implement sceKernelSyncOnAddressWait8 and sceKernelSyncOnAddressWait16 2026-10-06 04:30:12 +05:30
System/src fix(libkernel): flush only the paths the guest changed in sceKernelSync on Windows 2026-10-08 08:27:22 +00:00
Time fix(kernel): drain raised exceptions when leaving an alertable wait 2026-10-07 22:11:29 +02:00
CMakeLists.txt fix(module): resolve the default dlsym scope against guest exports only 2026-10-08 14:30:55 +02:00
KernelErrors.hpp refactor(kernel): share SCE kernel error codes through KernelErrors.hpp 2026-09-27 13:32:28 +07:00
Unimplemented.cpp feat(libkernel): implement sceKernelReleaseFlexibleMemory (#952) 2026-10-07 10:20:07 +13:00