fix(tools): match import_audit module names like the relinker #8124
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8124"
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 xXPBSXx on 2026-10-19T22:53:21Z.
What
tools/import_audit.pydecides whether an import is served by a title module withlibrary in modules, an exact file-name match. The relinker identifies modules by the name without its.prx,.sprx,.suprxor.debug_prxsuffix, and on Windows ignoring case (GuestModuleBuilder.cppModuleStem,ImportModule.hppModuleSuffixes). A title whose eboot imports fromEOSSDK-PS5-Shipping.debug_prxwhile the dump holdsprx/eossdk-ps5-shipping.prxtherefore gets every import reported asabsent("the loader fails") and exit code 1, although the converted title starts.ModuleNamesnow compares title module names by that stem, case-folded when the built libraries are Windows PE files;auditand the missing-library check use it unchanged. Two tests: a module fileshipping.prxserves an import fromshipping.debug_prx(CLI, JSON report classmodule), andModuleNamesfolds case only when asked.Overlap with #6171: measured on the same inputs, #6171 (SCE module identity) already turns the Coral-Island case from
absent236 into 0 (exit 0). This change covers the relinker's file-name rule (suffix ignored, case folded on Windows) for modules without a matching SCE identity; the CLI test (moduleshipping.prx, import fromshipping.debug_prx) still fails with #6171 alone. I have no title evidence for that second case. Both changemain()inimport_audit.py(lines 731-733) and are independent; if the maintainers prefer one, #6171 first and this one rebased or closed.Tested
Windows 10, WinLibs GCC 15.2.0 toolchain, Python 3.12:
python -I tools/tests/test_import_audit.pypasses (117 tests, 3 skipped); both new tests fail without the change (AttributeError: ... no attribute 'ModuleNames'and exit code 1 for the CLI case). Real data: the audit of one converted Unreal title (236 imports fromEOSSDK-PS5-Shipping.debug_prx, module fileeossdk-ps5-shipping.prx, Windows libs) reportedabsent236 and exit 1 before,absent0 and exit 0 after; the same title ran 560 s without a load error. A second title (Palworld, 289 such imports) had the same report. No title run for this change.tools/check_conventions.py --base upstream/main --head HEADreports only the empty template sections.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)AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T23:01:29Z.
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.
main)tools/import_audit.pyL731-733Some 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.
tools/import_audit.pytools/tests/test_import_audit.py