import_audit.py: --modules fails on converted .guest.prx files (PE) #6378
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 IlCapra99 on 2026-10-15T13:40:13Z.
Command
python.exe .\AnyPS5\tools\import_audit.py <registries...> --libs .\AstroBot\libs\ --modules .\AstroBot\app0\sce_module\
Result
FAIL: AstroBot\app0\sce_module\libc.prx.guest.prx: sectionless ELF needs little-endian ELF64 program headers
Cause
libc.prx.guest.prxis a PE x64 DLL (starts withMZ, 2921 named exports, import table lists only KERNEL32.dll), not an ELF.read_exports(used for--libs) dispatches on ELF/PE magic, butread_modules(used for--modules) callself_imports/elf_exportsdirectly. A PE has no ELF section table, so it falls into the program-header fallback and fails the ELF64 check.Suggested fix
In
read_modules, dispatch on the magic bytes: forMZ, take exports from the existingpe_exportsand report no imports (the PS5 imports of converted modules are already in their.registry.json); keep the ELF path unchanged.I tested this only on
read_moduleswith mylibc.prx.guest.prx(2921 exports read, no errors), not on a full audit run.import_audit.py
Open question
Should
--modulespoint at the original (pre-conversion) ELF modules rather than the converted output directory? The help text says "the title's own modules", which suggests that. If so, the fix may instead be a documentation or error-message change.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T13:43:51Z.
The current
--modulescontract is to inspect the title's original ELF modules fromsource/sce_module; converted.guest.prxoutputs are PE files. Their PS5 imports are already represented by the per-module registry JSON passed as positional input, so the audit should keep rejecting the PE files themselves. I opened #6382 to make the help text, error and usage docs explain that directly, with a regression test for the converted filename.