Commit Graph
21 Commits
Author SHA1 Message Date
Get-fix 8c34587598 fix(relinker): search libc.prx for libkernel-only Windows executables
AnyPS5 exports some libkernel functions, such as __error, from
libc.prx, which libkernel.prx links. On Linux they resolve through that
dependency. On Windows, the import stubs search only the listed
modules, and libc.prx was listed only when libSceLibcInternal.prx was
needed. A PS4 homebrew that needs libkernel.prx but no C library (the
OpenOrbis graphics sample) failed with "unresolved ELF import
9BcDykPmo1I". libc.prx is now also listed when libkernel.prx is needed.
PS5 executables need libSceLibcInternal.prx and convert unchanged.
2026-10-15 21:02:31 +03:00
Adrià 3bb409b603 Merge pull request #5784 from gguerra26/fix/macos-m1-andn
fix(relinker): lower ANDN in Rosetta conversion
2026-10-15 19:25:06 +02:00
Adrià 5c0cc1bba4 Merge pull request #5755 from AlexOfTheForest/fix/decoder-rip-far-indirect
fix(relinker): report RIP-relative operands of far indirect CALL and JMP
2026-10-15 15:58:16 +02:00
gguerra26 9b92c55edf fix(relinker): lower ANDN in Rosetta conversion 2026-10-15 15:00:43 +02:00
Adrià 7bb2b1f973 Merge pull request #5598 from JJenkx/fix/guest-declared-host-import-registry
fix(relinker): record declared host imports in guest registries
2026-10-15 13:58:59 +02:00
JJenkx d94000a096 fix(relinker): load guest providers used by executable imports 2026-10-15 01:40:33 -04:00
Alexej Szpevák 8e812f4b73 fix(relinker): report RIP-relative operands of far indirect CALL and JMP
DecodeInstruction returned before reading the ModRM of FF /3 and FF /5,
so a far CALL or JMP through a RIP-relative pointer had no RIP-relative
displacement. A stub that moved such a JMP copied the displacement
without relocating it.

The decoder was compared with iced-x86 (AMD decoding) over 3.99 million
encodings: every opcode of the legacy, 0F, 0F38 and 0F3A maps under 34
prefix combinations and the VEX 0F, 0F38 and 0F3A maps, each with 48
ModRM forms. Apart from this, it agrees on length, RIP-relative offset,
control flow kind and branch target for every valid Zen 2 instruction
except near branches with a 66 prefix, recorded as technical debt, and
kernel-only returns, which it treats as sequential.

Add the comparison's metadata as cases: one RIP-relative encoding per
opcode, map and immediate size, every FF /r form, and the branch forms
with their flow kind and target. The existing cases check lengths only;
a loop or jrcxz decoded as an unconditional jump passed the whole suite.
2026-10-14 11:33:59 +02:00
JJenkx 48685f40e1 Merge remote-tracking branch 'origin/main' into fix/guest-declared-host-import-registry
# Conflicts:
#	docs/dev/debt/relinker.md
2026-10-14 01:25:14 -04:00
Dean 75690a117e Merge pull request #4237 from MarcZX100/codex/carry-fixed-base-3043
fix(relinker): load Windows executables at a fixed low base
2026-10-14 17:49:45 +13:00
Dean Galvin bf6b6c0a17 docs(relinker): describe fixed-base default for Windows executables 2026-10-14 17:39:48 +13:00
Dean f5cda839ec Merge pull request #4717 from Ondra97/codex/fix-relro-unused-filter
fix(relinker): map standalone RELRO in unused import filtering
2026-10-14 16:05:01 +13:00
Dean d1b3aa1372 Merge pull request #5195 from SandstromPL/fix/relinker-sce-code-analysis-extent
fix(relinker): keep code analysis inside the code extent of PS4 executables
2026-10-14 15:49:02 +13:00
JJenkx 4414bca721 docs(relinker): separate registry debt from startup and alias entries 2026-10-13 20:35:37 -04:00
JJenkx 2f7b33521f Merge commit '30f961266ade83b41d5c9de7dec1393e7fcecfb7' into fix/guest-declared-host-import-registry 2026-10-13 18:59:59 -04:00
Leandro Soares e5c782c54f fix(relinker): load converted Windows executables at a fixed low base 2026-10-13 19:11:54 +00:00
codingreapermapsandClaude Opus 5.5 430e5c833e feat(relinker): add --trace-imports for Windows executables
With --trace-imports the entry stub resolves TraceImport_nid_no_patch
in libc.prx and passes each function import through it before writing
the slot: every PLT slot, and a GOT slot only when the original symbol
is a function, so data imports such as __stdoutp keep their address.
Without the option the output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:55:31 +02:00
SandstromPLandClaude Opus 5.5 78f620cf9e fix(relinker): keep code analysis inside the code extent of PS4 executables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:10:51 +05:30
Ondra97 bde680c855 fix(relinker): map standalone RELRO in unused import filtering 2026-10-13 11:19:36 +02:00
JJenkx d6728f4e51 fix(relinker): record declared host imports in guest registries 2026-10-12 20:05:34 -04:00
LeandroLP23andClaude Opus 5.5 3e3b0a27ca docs(debt): mention --windows-gui and its lost output on the console entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:02:32 +02:00
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 20:38:29 +02:00