feat(libkernel): load the relinked module for a guest module path #717
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/717"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T17:53:39Z.
What
dlopen(and sosceKernelLoadStartModule) passed the resolved guest path to the host loader, which cannot load the original ELF module. When a relinked module<path>.guest.prxexists beside it, that module is loaded instead. For a module the executable already loaded at startup, the host loader returns the same module, so the handle refers to the instance the title already uses.PPSA12544 (Hollow Knight: Silksong, Unity) calls
sceKernelLoadStartModule("/app0/Media/Modules/Il2CppUserAssemblies.prx")and.../PS5Util.prxat startup and resolves IL2CPP functions through the returned handle (il2cpp_set_find_plugin_callbackand others). Both loads returned0x80020002(unable to load ..., error:0x80020002on stdout), the resolved function pointers stayed null and the title later called through a nullil2cpp_set_find_plugin_callback.guest_dynamic_loader: a placeholder ELFanyps5-relinked-module-for-test.prxwith the fixture module copied beside it as.guest.prxopens through the ELF path and resolvesGuestModuleAdd. With the loader change reverted the test aborts.The relinked modules are placed beside the originals by #716 for modules outside
sce_module; modules insce_modulealready are.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Ryzen 7 9800X3D, Radeon RX 9070 XT.
ctest: 288/290 passed, includingguest_dynamic_loader.agc_driver_lds_atomics64andagc_driver_vopc_compare_tablefail on this machine onmainas well (Vulkan device tests).unable to loadlines are gone and IL2CPP initialisation opensMedia/Metadata/global-metadata.dat.Not tested on Linux.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)sce_moduletogether with #716)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T18:15:26Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/tests/GuestDynamicLoader.cppL2, L39Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T20:49:21Z.
On the overlap note: #722 adds unrelated rtld thread-atexit checks to
GuestDynamicLoader.cpp; both append to the end ofmainand add includes, so whichever merges second needs a small rebase.