Repository navigation
fix(relinker): bind Windows imports to their declared modules - #684
oneandonlydean merged 3 commits into
Conversation
|
Thanks, the idea of binding each qualified import to its declared module makes sense to me, and the new test covers the cases you list. I found one problem with a real title, though. I relinked PPSA21564 for Windows with this branch ( The module names in Could the module ID be mapped to its On Linux nothing changes: PPSA21564's relinked eboot and guest modules come out byte for byte the same as on main, both with and without its bundled It conflicts with #698 in |
0be543d to
e96e9c1
Compare
|
Thanks for the alias mapping. I read PPSA21564's eboot dynamic table against
One smaller point, Linux only: in |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
…odules A qualified import whose module name matches no DT_NEEDED entry now uses the unqualified search order instead of failing with "Import module is not a dependency". Restore the Linux rejection of duplicate exports within one guest module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent verification (relinker-only, builds anywhere). Built the relinker from
The warm-up test that this needs is confirmed by running the same test against which is what this PR changes (bind each qualified import to its declared module and allow a duplicate export across Windows guest modules when the import selects a provider). With the change the fixture relinks. Limits: no Windows host here, so I did not execute a relinked binary; the parse and relink behaviour is what I checked. No title involved. |
… third-party results Drops the stale pending-dependency note (boykopovar#553 boykopovar#683 boykopovar#684 boykopovar#685 are merged), adds the package source and the Linux, extended-gameplay, save/load and audio results reported in the thread, and replaces the cold-start note with the measured cause. The UCRT diagnostic note is removed: no report on current main. Co-Authored-By: Claude <noreply@anthropic.com>
What
Windows startup currently strips the module qualifier from ELF imports and searches every loaded library. A title's bundled
libc.prxshim can then intercept imports explicitly belonging to a system module with its placeholder exports.Preserve
DT_SCE_IMPORT_MODULEIDs through executable and guest-module imports and bind each qualified import to its declared module. Guest filenames and SONAME aliases identify providers; module names with underscore/dot or-modulefilename differences map to declaredDT_NEEDEDdependencies, with exact matches preferred and ambiguous aliases rejected; duplicate exports in different Windows guest modules are allowed when imports select a provider explicitly. Unqualified ambiguous guest imports and malformed/unknown module IDs are rejected. Missing symbols still fail at startup. Host system modules may resolve their shared runtime implementations from hostlibc.prx; that path never searches unrelated guest modules. TLS resolver selection follows the same module scope. Inputs without module metadata retain the legacy lookup behavior; Linux keeps its existing duplicate-export policy.Rebased over #672 and #698 on main, retaining Linux host/guest symbol isolation, ambiguity checks and absolute-symbol handling.
Tested
Windows 11, bundled MinGW, Release, rebased on main
fe98276f: all 28 relinker CTest cases pass. The newfoo_native/foo.native.prxandlibSceFont/libSceFont-module.prxfixtures reproduce the reported failure before the fix and now convert and run correctly, including imports in guest initializers. Exact-match precedence and ambiguous alias rejection are covered. PPSA21564 itself was not available locally; no direct retest of that title is claimed.The new test converts and executes synthetic Windows binaries with colliding providers returning different values, a SONAME alias, and a guest initializer. It checks wrong-provider and missing-symbol startup failures, an unavailable module, invalid qualifiers/IDs, and ambiguous unqualified imports.
Integration with feat(libs): implement homebrew libc and kernel runtime exports #683 (runtime exports), feat(agc): support version initialization and raw compute programs #685 (raw AGC compute), and feat(userservice): implement foreground user, registered list, user colour and NP account id #553: the original integration based on
af92452fbuilt and passed 290/290 CTest tests; DOOM Shareware homebrew PPSA99666 01.001.000 reached E1M1 and responded to movement and shooting. fix(relinker): allow function aliases with different sizes #614 is already on main. No game files added or modified.Updated integration on main
fe98276fwith the repaired feat(libs): implement homebrew libc and kernel runtime exports #683/fix(relinker): bind Windows imports to their declared modules #684/feat(agc): support version initialization and raw compute programs #685 and feat(userservice): implement foreground user, registered list, user colour and NP account id #553: full build plus the runtimelibstarget succeeded; all nine focused integration tests passed. DOOM Shareware reached E1M1 again with movement and shooting through AGC compute presentation. Profiling recorded 3,798 dispatch-cache hits in 3,800 dispatches with zero evictions. This is cache-use evidence, not an FPS benchmark. Cold shader compilation can still exceed the homebrew frame deadline and trigger its CPU scaler; a warm restart used AGC. The startup UCRT diagnostic remains. Updated Linux and Windows CI pass.Checklist
fe98276f; open PRs checked, related overlap with fix(relinker): keep host prx references out of guest modules on Linux #672 noted aboveIn-game screenshots
Two E1M1 gameplay captures from the integrated DOOM Shareware homebrew run, showing the final integration build and movement/shooting. The integration dependencies and limits are described above.