Repository navigation
refactor(libc): name the 12 Cyberpunk stubs the NID database resolves - #2301
Merged
Merged
Conversation
This was referenced Oct 9, 2026
parl0v
force-pushed
the
refactor/libc-name-cyber-stubs
branch
from
October 9, 2026 15:33
65195a9 to
9cea268
Compare
Collaborator
|
Checked all 12 names with |
Progress report (d70b899 → 9cea268)➖ System libraries: 84.69% (+0.0%, +12 declared, -12 removed functions) 🆕 12 declared as stubs
🗑️ 12 removed
|
This was referenced Oct 10, 2026
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tools/nid_names.pyresolves 14libcCyberUnknown*stubs, and the earlier pull requests that implemented them (#492, #1952, #1981) are closed. Two of them are being implemented in their own pull requests,abs(Ye20uNnlglA) in #2316 and__powidf2(H+8UBOwfScI) in #2158, so this leaves those two alone. As in #1145, it renames the other 12 so aNotImplementedfailure names the real function. Behaviour is unchanged: every one still throws.5Lf51jvohTQlibcCyberUnknown03_Mtx_destroy7yMFgcS8EPAlibcCyberUnknown05_Cnd_destroyCyXs2l-1kNAlibcCyberUnknown07_IswctypeJhVR7D4Ax6YlibcCyberUnknown09_WStoulSreZybSRWpUlibcCyberUnknown10_Cnd_initVsP3daJgmVAlibcCyberUnknown11_Cnd_broadcastYaHc3GS7y7glibcCyberUnknown12_Mtx_initgTuXQwP9rrslibcCyberUnknown13_Mtx_unlockiS4aWbUonl0libcCyberUnknown14_Mtx_lockvEaqE-7IZYclibcCyberUnknown16_Cnd_waitrWSuTWY2JN0libcCyberUnknown18vsnprintf_stfNbpqL3D0MlibcCyberUnknown19vsscanf_sEach name hashes to its NID with
compute_nid. The functions follow the_nid_postfixconvention, so theAPS5_EXPORTaliases go.Side effect on the export table: the stubs were also exported under their own names, which
nid_patcherhashed into 12 extra NIDs (for examplecompute_nid("libcCyberUnknown03")) that no Sony module has. Those are gone. The 12 real NIDs above are still exported:libc.prxgoes from 1483 to 1471 exports, and the 12 removed are exactly the hashes of the old stub names.The comments above
vsnprintf_sandvsscanf_s(file-size idiom from #358) are left as they are; #1981 discussed that they don't match the names.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release,
BUILD_TESTING=ON, on d70b899.python tools/nid_names.py: 22 unknowns / 14 suggestions before, 10 unknowns / 2 suggestions after (the two left to feat(libc): implement __powidf2 #2158 and feat(libc): implement abs #2316).libc.prxexport table compared withobjdump -pbefore and after, as above.ctest: 506/507 passed (1 skipped by design);guest_sce_netfails on this host onmaintoo, fixed by test(net): reset the closed peer with unread data so the send fails at once #2295.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functions (tools/pr_overlap.py: no shared exports; feat(libc): implement __powidf2 #2158 and feat(libc): implement abs #2316 edit the neighbouring stubs, so whichever lands second needs a rebase).mdfiles or images added to the repository