feat(libSceLibcInternal): name 53 runtime helper exports from their NIDs #13840
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13840"
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 CodingBreadd on 2026-10-31T08:57:37Z.
What
Names 53 of the 58 locale, stdio, time, exit and thread helpers among the 120
sceLibcInternalUnknown_*_nid_no_patchexports of libSceLibcInternal, such as_Fopen,_Printf,_Getfld,_Getctyptab,_Makeloc,_Gentime,_Getzone,_Atqexit,_Call_onceExand_Lock_spin_lock. Each new name is a PS5 3.20 import name already listed under "Additional imported names" in the libSceLibcInternal debt file, and itstools/nid_names.pyhash equals the stub's NID.Every renamed export still throws through
NotImplemented_nid_no_patch, keeps the no-parameter import-resolution convention and is declared once ininclude/RuntimeInternals.hpp. No other library exports these names. Missing-import and unimplemented-call errors now name the function instead of the alias. The debt entry is unchanged: it already lists these names as declared for import resolution only, with unverified prototypes and behavior, and that is what remains open.The other 5 keep their aliases: #13724 implements
_Mtxdst,_Mtxinit,_Mtxlockand_Mtxunlock, and the_Nnlstub directly follows the blocks #13724 deletes, so renaming it would make the two conflict. The umbrella include goes first so it does not touch the line #13782 appends after. This branch merges cleanly with #13724, #13782 and #13835, which names the math helpers. #13273, #11749, #11750, #11751, #12924 and #12896 change libSceLibcInternal but none of these exports, and #5021 changes onlysceLibcHeapGetTraceInfoin the same file.Tested
Windows 11, WinLibs GCC 15.2.0 (UCRT, POSIX, SEH). Built
libSceLibcInternaland the patchedlibSceLibcInternal.prxfrom this branch and frommain; both patched export tables hold the same 662 NIDs.ctest -R "^(guest_getopt|guest_inet_address)$": 2/2 passed.test_public_headers.py --audit-onlyand header compile batches 3, 4, 5 and 26 (the ones holding the libSceLibcInternal headers) pass, run directly.tools/check_conventions.py --base origin/mainpasses. No title tested.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T09:07:18Z.
Review: APPROVED
Reviewed — looks good
At head
ed98d46807d4448543a0656f666d09d81aa61a6c, all 53 renamed helpers map to their existing import NIDs, remain throwing stubs, and have no blocking ABI or convention issue in the reviewed diff.What I ran
Reviewed the exact head
ed98d46807d4448543a0656f666d09d81aa61a6c. The branch's merge base is45e39c7ad16c93871809eee8c81c3865596e883f; a local merge preview against currentmain809c7fa2dfb1b21e2b31b3114b7d51bc14ee88abwas clean. Checks ran on Linux 6.1.0-54-amd64 with Python 3.11.2; GCC 12.2 was available but I did not compile.I compared all 53 computed name NIDs with the export IDs removed by this patch and checked the base debt inventory. The precheck's isolated checkout lacked two local-only helper scripts (
pr_abi_audit.pyandpr_test_quality.py); I ran both from the workspace against these exact SHAs.Results
809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab; no declared dependency.export-removedwarnings for replacing aliases, with no other finding.Unedited outputs from checks
git diff --checkproduced no output and exited 0. The ABI auditor reportedpassed_with_warnings: its 53 warnings are the old aliases removed by this rename; the name-to-NID comparison above matched all 53 to their replacement symbols. The wrapper's missing-helper message was:The same missing-helper condition affected the wrapper's heuristic invocation; both helper checks were run directly from the workspace. Hosted status at review time:
Findings
Blocking
None found.
Non-blocking
The PR intentionally records names for import resolution only; prototypes and runtime behavior remain unverified, and the functions still throw through
NotImplemented_nid_no_patch. The author's Windows build/test evidence is useful but not independently reproduced here.Sources
Not verified
No local C++ build, CTest, runtime import test, or console/title test was performed. Hosted Windows was in progress; hosted Linux was skipped. Function prototypes and runtime behavior remain unresolved as the PR states.