You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ctest loads the unpatched libraries, so an import that nid_patcher renames only fails when a title loads the patched prx #1827
Every test puts libs/unpatched on its path (RUNTIME_OUTPUT_DIRECTORY in core/libs/CMakeLists.txt, PATH=path_list_prepend:$<TARGET_FILE_DIR:...> in the test definitions). Titles load build/core/libs/libs/*.prx, which nid_patcher has 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 with SDL_. Every other export is renamed to its hash. On the import side only _nid_postfix and sce* 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.prx imports _ZN12GuestSockets6IsOpenEi from libkernel. In the patched libkernel that export is renamed, and on Windows the module fails with GetLastError: 127, so OpenGL Showcase (PPSA99005) no longer starts (details in #1613).
On main4b6ab6b all 122 patched libraries load on Windows, so nothing is broken today. Nothing checks it, though: tools/import_audit.py checks a title's imports, and nid_patcher_dynamic_strings/nid_patcher_symbol_versions cover one fixture on Linux only.
A test that loads each patched .prx with its imports bound would catch it. PR to follow.
Activity