refactor(libc): read the title's compiled SDK version through one helper #26296
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26296"
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 LeandroLP23 on 2026-11-23T16:34:31Z.
What
First step of #26276, as agreed there. Sixteen libraries each define their own function that returns the compiled SDK version of the running title, the 32-bit field at offset
0x10of the process parameters.libc/include/ApplicationHeap.hpp, which declaresApplicationProcessParameters_nid_no_patch, gets oneinline std::uint32_t ApplicationCompiledSdkVersion(). It keeps the parameters pointer in astatic, assceKernelGetCompiledSdkVersiondoes, so a caller that polls it does not search the image each time.sceKernelGetCompiledSdkVersionand returned0xffffffffon a failure that cannot happen with a local output; VdecSavc2 also savederrnoaround the call. They call the helper too, and the failure branches go.Http2did the same, but #25731 conflicts with it, so it is left for later.#24915 also changes the includes of
ApplicationHeap.hppand cannot be compared automatically because it conflicts withmain.git merge-treeof its head with this branch merges that file cleanly.33 lines added and 102 removed.
No change in behaviour.
Tested
Windows 11 (10.0.26300), WinLibs GCC 15.2.0 r7, Release.
ctest -R 'guest_content_export|convert_keycode|gnm_driver_compat1|guest_hmd($|_)|^guest_move$|np_commerce|guest_np_web_api|guest_screenshot|vr_tracker2|video_recording|sdec|application_?heap|process_?param', with its 27 build outputs fromtools/select_tests.py targets: 41 of 41 onmainefc6f9c3baand 41 of 41 with this change applied to it.tools/check_conventions.pypasses.tools/pr_overlap.py --branchfinds no overlap with the 2583 open pull requests apart from #24915, which it cannot compare (above).Not run: Linux and macOS.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)