feat(libkernel): implement sceKernelGetLibkernelTextLocation #4567
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4567"
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 jagrat04 on 2026-10-12T15:51:11Z.
What
Implements sceKernelGetLibkernelTextLocation (NID AmJ0mn2l4lM) in libkernel. It writes the base address and size of the main executable's primary load segment, following fpPS4's reference implementation. Throws std::invalid_argument on null pointer arguments and verifies segment existence. Adds guest unit tests in GuestModuleInfo.cpp and documents Technical Debt.
Fixes #4560
Tested
Guest unit tests in core/libs/tests/GuestModuleInfo.cpp
Checklist
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T16:03:53Z.
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/prx/libkernel/Module/src/ModuleInfo.cppL430core/libs/tests/GuestModuleInfo.cppL20, L98sceKernelGetLibkernelTextLocation_nid_postfixImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T16:07:08Z.
Progress report (
a60f52e→dbce472)📈 System libraries: 86.37% (+0.01%, +1 implemented functions)
✅ 1 implemented
sceKernelGetLibkernelTextLocation_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:57:28Z.
Checked against fpPS4's
ps4_sceKernelGetLibkernelTextLocation(first segment of the main program, 0 on success, null arguments rejected): same behaviour. It reuses thesceKernelGetModuleInfolookup on Linux and Windows,guest_module_infopasses and fails to link without the change, and the TechnicalDebt line states what is unverified. Merging.Note: #4675 implements the same export later than this PR; it will need closing as a duplicate.