ctest loads the unpatched libraries, so an import that nid_patcher renames only fails when a title loads the patched prx #1827
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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-10-08T20:41:35Z.
Every test puts
libs/unpatchedon its path (RUNTIME_OUTPUT_DIRECTORYincore/libs/CMakeLists.txt,PATH=path_list_prepend:$<TARGET_FILE_DIR:...>in the test definitions). Titles loadbuild/core/libs/libs/*.prx, whichnid_patcherhas rewritten. Its rule (core/libs/nid/src/NidResolver.cpp:40-62) keeps a host export's name only if libc exports it too, it ends in_nid_no_patch, or it starts withSDL_. Every other export is renamed to its hash. On the import side only_nid_postfixandsce*names are rewritten.So a library that calls a plain C++ helper from another library links, passes every test and CI, and then fails to load for every title. #1613 is an example:
libScePosixForWebKit.prximports_ZN12GuestSockets6IsOpenEifrom libkernel. In the patched libkernel that export is renamed, and on Windows the module fails withGetLastError: 127, so OpenGL Showcase (PPSA99005) no longer starts (details in #1613).On
main4b6ab6bball 122 patched libraries load on Windows, so nothing is broken today. Nothing checks it, though:tools/import_audit.pychecks a title's imports, andnid_patcher_dynamic_strings/nid_patcher_symbol_versionscover one fixture on Linux only.A test that loads each patched
.prxwith its imports bound would catch it. PR to follow.Found with AI assistance (Claude Code).