fix(libSceNpCppWebApi): name the exports the NID database resolves #8086
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8086"
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 Arararararagi on 2026-10-19T20:45:33Z.
What
The 73
sceNpCppWebApiUnknown<nn>exports oflibSceNpCppWebApiwere placeholders carrying anAPS5_EXPORTalias: the loader bound the NID a title imports through the alias symbol, and also bound the hash of the invented namesceNpCppWebApiUnknown<nn>, which no guest imports.aerolib names every one of the 73, and each name recomputes to the NID a title imports, so the name is not guessed (
tools/nid_names.py,compute_nid(name) == nid; same evidence chain as the existingsceNpGetSandboxInfo,scePsmlMfsr*andsceVoiceQoSSetConnectionAttributeentries). Each placeholder is replaced by the real symbol name and the alias is dropped, as the other 205 definitions inExport.cppalready do, and the block is sorted by demangled name so theCommoninstantiations and the V1/V5 accessors stay together;NotImplemented_nid_no_patchtakes__func__now that there is a real name to report.docs/dev/debt/libSceNpCppWebApi.mdrecords what is still unknown about them: a mangled name gives the class, the method and the argument types, but not the layouts the arguments point at, the values the caller reads back, the console's errors or any title call site.Behaviour is unchanged: every one of the 73 still throws. No title-side call site is known for any of them; they exist because a dump that ships no
libSceNpCppWebApi.prximports them.Tested
Not tested on a title, a console or on hardware.
core/libs/nidNid::ComputeNid, the function the loader resolves host symbols with, run against the 73(NID, name)pairs of this diff: 73 names checked, 0 mismatched, both with an empty library name and withlibSceNpCppWebApi, so every name still resolves to the NID the title imports.cmake --build build --target libSceNpCppWebApi) and comparednm -D --defined-onlyon the twolibSceNpCppWebApi.prx: both export 359 NIDs, and acommof the sorted lists reports 0 NIDs bound only onmainand 0 bound only here. Dropping the aliases loses no import.main; the difference is exactly the 73 hashes of the inventedsceNpCppWebApiUnknown<nn>names, whose names match, and no symbol name binds two NIDs.ctest --test-dir build -R guest_np_cpp_web_api: 2/2 passed.python3 tools/nid_names.py: 95 unknown stubs before, 22 after. The 22 are the ones no database names.python3 tools/check_conventions.py --base origin/main: passed.python3 -m unittest discover -s tools/tests: 690 tests,skipped=10; the single error istest_shader_cache_runtime_sources.py, which callsunittest.main()at import and reads its source path fromargv, so it only runs under its CMake registration.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)