Repository navigation
feat(relinker): log deferred Windows modules the executable imports from - #9228
oneandonlydean merged 2 commits into
Conversation
Since boykopovar#8162 a --module-dir module that the executable needs is deferred on Windows: the entry stub maps it and the title starts it with sceKernelLoadStartModule. A module the executable imports from but the title never loads gets no module_start and no initializers, silently. The entry stub now prints one line at startup for each deferred guest module that an import of the executable names. Guest module bytes are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Rechecked on current #10157 also changes AI-assisted: yes (Claude Code) |
|
The combination, as promised: AI-assisted: yes (Claude Code) |
…orted-modules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
This is the follow-up to #8162 that @oneandonlydean asked for in this comment.
Since #8162, a
--module-dirmodule that the executable needs is deferred on Windows. The entry stub maps it at startup, andDynamicLoaderruns itsmodule_startand initializers only when the title loads it withsceKernelLoadStartModule. If the executable imports from such a module but the title never loads it, the module gets neither, and nothing reported that.Now the Windows entry stub prints one line at startup for each deferred guest module that an import of the executable names. The lines come after the imports are bound and before
Transferring control to ELF entry point:DeferInitializationthat is in the search order of one of the executable's own imports, matched by file name or module identity. The stub uses the same match to bind the import. A guest module's own imports do not count. An import with no module name searches every library, so it is not reported.--executableconversions are unchanged.mono-ps4.sprx. I left out the optional second line (the first imported call runs before the module has started), because it needs a check on every call through those imports.Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, relinker-only build (
-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON) onmaincecb540a63, then again after mergingmain6cd36e6517.ctest: 233/233 pass oncecb540a63. After the merge, 240/241 pass with-j8;conventions_env_referencetimed out at 60 s under load and passes alone in 32 s.guest_module_dir(new case): an executable that callssharedfromneeded.prx.needed.prxinMedia/Modules, converted with--module-dir Media/Modules: the Windows executable contains the line, prints it on stdout and exits with 42.needed.prxinsce_module, which starts at startup: the executable contains no such line and exits with 42.DT_NEEDEDentry in both directories.main'sWindowsEntryStubBuilder.cpp, the case fails (AssertionError: Media/Modules); with the change, it passes.mainalone, Boggle's conversion stops atlibSceFios2.prx(the fix is in feat: run PS4 games on the AGC driver — Limbo (CUSA01664) in game (integration branch) #6977).tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py:guestStartup.Initialize, which would only be a textual conflict.docs/dev/debt/relinker.md. fix(relinker): share Windows --module-dir modules between executables #7450, which touchedtest_guest_module_dir.py, is closed.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)🤖 Generated with Claude Code