feat(libkernel): implement sceKernelGetModuleInfoFromAddr #723
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/723"
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 alfalfa-star on 2026-10-05T18:00:41Z.
What
Implement
sceKernelGetModuleInfoFromAddr, which threw.A title's own
libc.prxcalls it from__cxa_thread_atexitwith flags 2 andst_size0x1A8, and stores the 32-bit field at offset 0x108 (id) in its destructor record (PPSA14632). The placeholderModuleInfois replaced by the 0x1A8-byteModuleInfoExlayout from shadPS4, with offset asserts.On Linux the image containing the address is found with
dl_iterate_phdr, and the info reports its name (host file name without.guest.prx), id, TLS block,DT_INIT/DT_FINI,eh_frame_hdr, theeh_frameit points to with its size, and up to four load segments with their protection. The id is thesceKernelLoadStartModulehandle when the image was opened through the loader, and otherwise a stable id from the same range, so ids never collide with loader handles. An address outside every image returns ESRCH and a null info EFAULT. Unknownflagsvalues and a differentst_sizethrow, and Windows throws throughNotImplemented_nid_no_patch. The assumptions are recorded in TechnicalDebt.Tested
guest_module_infotest (Linux only): id equals the loader handle and is stable across a seconddlopen, name, an executable segment containing the queried function,eh_frame_hdr/eh_frame, a stable distinct id for the executable, ESRCH, EFAULT and the rejected flags andst_size. Full ctest: 291/291 apart from the three wave64 pixel tests that fail onmainon this GPU (RX 9070 XT, RADV).__cxa_thread_atexitcompletes and Unreal Engine starts, readsuecommandline.txtand its config, and runs untilsceVoiceQoSInit, which is not implemented.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)🤖 Generated with Claude Code