Commit Graph

501 Commits

Author SHA1 Message Date
Adrià a2a3a3a94d
Merge pull request #4062 from danzaio/fix/windows-log-without-standard-handles
fix(relinker): log Windows output when standard handles are missing
2026-10-13 14:11:42 +02:00
boykopovar 04899cb0f7 fix(relinker): align console progress columns 2026-10-13 13:02:03 +03:00
boykopovar a534bd67ca fix(relinker): report intermediate output image progress 2026-10-13 12:59:23 +03:00
boykopovar d35b1afa51 fix(relinker): use consistent two-space nesting in runtime layout 2026-10-13 12:59:22 +03:00
boykopovar c9a94dd021 fix(relinker): remove layout padding and blank lines after headings 2026-10-13 12:59:04 +03:00
boykopovar 754b82163b fix(relinker): remove indentation from conversion summary 2026-10-13 12:58:48 +03:00
boykopovar 868d7a138d fix(relinker): separate console sections without spacing every message 2026-10-13 12:58:35 +03:00
boykopovar 6f2e4b6902 test(relinker): update runtime layout expectations for tree output 2026-10-13 12:58:35 +03:00
boykopovar 56c2a53188 fix(relinker): redraw console progress and format runtime layout as a tree 2026-10-13 12:58:34 +03:00
boykopovar e1ef33047c fix(relinker): validate scan ranges before narrowing memory offsets 2026-10-13 12:57:55 +03:00
boykopovar 3e658db4b6 refactor(relinker): remove the obsolete file-based icon builder 2026-10-13 12:57:55 +03:00
boykopovar 6224febfb0 feat(relinker): report instruction conversion progress for executables and modules 2026-10-13 12:57:54 +03:00
boykopovar b42aa8c540 feat(relinker): expose in-memory conversion through a portable core library 2026-10-13 12:57:53 +03:00
boykopovar 5e5eba8922 fix(relinker): reject layouts that would discard exception metadata 2026-10-13 12:57:06 +03:00
boykopovar 37e25a2a78 refactor(relinker): separate native module discovery from prx conversion 2026-10-13 12:57:05 +03:00
boykopovar 02cd2e57e2 refactor(relinker): move windows icon and diagnostic io to native adapters 2026-10-13 12:56:42 +03:00
boykopovar cd0433fd82 feat(relinker): report syscall scanning and import analysis progress 2026-10-13 12:56:16 +03:00
boykopovar 04ca1721e5 feat(relinker): add progress interface and console reporter 2026-10-13 12:55:34 +03:00
Adrià 77b9f7270c
Merge pull request #3579 from Celegans12/fix/relinker-present-optional-provider-errors
fix(relinker): preserve load failures of present optional providers
2026-10-13 11:53:01 +02:00
p3nicillin 99efb32c40 feat: convert a title's other executables and start them with sceSystemServiceLoadExec
The relinker's repeatable --executable converts another executable of the
title beside the output, sharing its libs, app0 and guest modules.
sceSystemServiceLoadExec maps /app0 paths to those executables, passes the
argument list on the new command line and finds the main executable through
APS5_EBOOT. RetroArch (PPSA99169) starts its frontend picker this way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:51:50 +01:00
Dean ebf417a51c
Merge pull request #4340 from ArjenS-LA/fix/guest-gnu-hash
fix(relinker): convert guest modules with GNU hash tables
2026-10-13 18:49:38 +13:00
Dean 758aca7373
Merge pull request #4116 from hawwwwwk/investigate/relinker-eip-relative
fix(relinker): resolve EIP-relative imports in strict filter
2026-10-13 13:41:08 +13:00
Dean 1b360faa1d
Merge pull request #4441 from superhe11/codex/fix-elf-header-validation
fix(relinker): validate the ELF object version and header size
2026-10-13 13:34:03 +13:00
Simone ad0d478a81 Merge remote-tracking branch 'origin/main' into fix/relinker-weak-imports
# Conflicts:
#	core/relinker/relinker/src/output/SysVDynamicSectionBuilder.cpp
#	core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp
2026-10-12 23:40:54 +02:00
Superhe11 faf1cd77c6 fix(relinker): validate the ELF object version and header size 2026-10-12 21:35:13 +03:00
Dean ee966bb747
Merge pull request #4542 from saxopa/fix/relinker-sce-relro
fix(relinker): load a PT_SCE_RELRO segment that no PT_LOAD covers
2026-10-13 07:32:37 +13:00
Dean acbaa8a16d
Merge pull request #4495 from SibteProf/fix/relinker-sdk-mman-syscalls
fix(relinker): recognize SDK memory syscall trap patterns
2026-10-13 07:29:18 +13:00
Dean 2350fa5353
Merge pull request #4489 from Dripl1x/codex/guest-export-index
perf(relinker): index guest exports for dependency resolution
2026-10-13 07:28:34 +13:00
Dean e305bc4e4a
Merge pull request #4483 from fable-void/pr/relinker-jump-table-targets
fix(relinker): treat jump table targets as branch targets when moving instructions
2026-10-13 07:28:12 +13:00
Dean 91e263824e
Merge pull request #4452 from orishamir/fix/relinker-null-symbol-imports
fix(relinker): resolve relocations against null symbol entries to 0
2026-10-13 07:26:13 +13:00
Dean d3187dff7f
Merge pull request #4346 from SandstromPL/fix/relinker-registry-after-patch
fix(relinker): write registries after the executable
2026-10-13 04:52:40 +13:00
Dean 57f5ec232c
Merge pull request #4338 from ArjenS-LA/fix/diagnostic-input-preservation
fix(relinker): preserve inputs when writing Windows diagnostics
2026-10-13 04:52:18 +13:00
Dean 0a6bb6ac51
Merge pull request #4337 from ArjenS-LA/fix/windows-origin-slash
fix(relinker): accept trailing separators on the Windows origin path
2026-10-13 04:51:57 +13:00
Dean 05f6460165
Merge pull request #4336 from ArjenS-LA/fix/guest-runpath-list
fix(relinker): rebase each origin in guest runpath lists
2026-10-13 04:51:37 +13:00
saxopa d0502b449d fix(relinker): load a PT_SCE_RELRO segment that no PT_LOAD covers
PS4 executables keep their relocated read-only data, GOT and init/fini
arrays in a PT_SCE_RELRO segment outside every PT_LOAD. The segment filter
dropped it, so Windows and macOS output stopped at the first relocation
into it, and Linux output placed the relinker's extra block over its
addresses without an error. The ELF reader now reports such a segment as a
read-write PT_LOAD. A PT_SCE_RELRO inside a PT_LOAD keeps being skipped,
and one that partially overlaps a PT_LOAD throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:54:13 +02:00
Simone bdf003a5e8 test(relinker): register weak_imports next to elf_header
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:31:10 +02:00
Simone cb1c18d552 fix(relinker): keep weak undefined imports weak
Weak undefined imports in the input ELF became STB_GLOBAL in the relinked
output, so a title that weak-imports a function no module exports stopped
at startup instead of binding the import to null.

Keep STB_WEAK on the relinked dynamic symbols. On Windows, write 0 plus
the addend to the slot of a weak import that no searched module exports.

Fixes #4497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:48:50 +02:00
Dean f1514adea3
Merge pull request #4060 from coltken95/claude/sleepy-dirac-e44kw4
fix(relinker): decode 3DNow! instructions with their ModRM and opcode…
2026-10-13 02:35:21 +13:00
Dean b39b78a5ad
Merge pull request #3809 from aayushmishraaa/fix/relinker-reject-non-x86-64
fix(relinker): reject input executables that are not x86-64
2026-10-13 02:34:37 +13:00
Dean a1a9c3db59
Merge pull request #3860 from excited-raccoon/perf/relinker-linear-control-flow
perf(relinker): walk fallthrough instructions without queueing
2026-10-13 02:31:15 +13:00
SibteProf c0967216bf fix(relinker): recognize SDK memory syscall trap patterns 2026-10-12 18:25:06 +05:00
Evgeniy Kazarin 33c955a8e3 perf(relinker): index guest exports for dependency resolution 2026-10-12 16:15:06 +03:00
fablevoid 1541244b78 fix(relinker): treat jump table targets as branch targets when moving instructions
The AMD-only converter moves the instructions next to a short AMD-only
instruction into its stub, and refuses to move one that a branch
enters. It knew only direct jump and call targets, so a switch case
entered through a jump table could land inside the jump written over
the moved instructions.

The converter now also reads relative jump tables: a RIP-relative LEA
whose address lies in a loaded segment starts a table of 32-bit
offsets from that address, read while each target starts an
instruction of the segment being converted. To read them, Convert
takes the program headers and converts their executable load
segments; the relinker passes all headers, and
ElfReader::ReadCodeSegments, now unused, is removed.

The converter test builds a dispatch through such a table whose second
case enters the instruction after a 4-byte 256-bit store, and checks
that the store takes the instruction before it instead. It also checks
that reading stops at an entry that does not start an instruction,
that only a LEA forms a table address, that tables are read only
inside loaded segments, that only executable load segments are
converted, and that a segment past the end of the file fails the
conversion.

PPSA12544: one 256-bit store in Il2cppUserAssemblies moved the
instruction after it, which is case 1 of a switch; it now goes through
an island. The other relinked files are unchanged.

AI-assisted: yes
2026-10-12 13:06:23 +00:00
Dean 71c3dbb722
Merge pull request #4190 from ArchitDewan/fix/relinker-empty-path
fix(relinker): reject empty positional paths
2026-10-13 01:29:30 +13:00
Dean f8dee05957
Merge pull request #4091 from jweidenh/codex/guest-noop-relocations
fix(relinker): ignore no-op relocations in guest modules
2026-10-13 01:27:26 +13:00
Dean 253ec3ffee
Merge pull request #4084 from hawwwwwk/pr/relinker-suprx-guest-alias-current
fix(relinker): resolve .suprx guest module aliases
2026-10-13 01:27:08 +13:00
Dean a46ffb5e75
Merge pull request #4066 from hawwwwwk/pr/relinker-ff-callsite-current
fix(relinker): filter non-reference RIP-relative FF operations
2026-10-13 01:25:57 +13:00
Ori Shamir 1205d03daa fix(relinker): resolve relocations against null symbol entries to 0
A relocation whose dynamic symbol entry is all zero, like the null symbol,
now takes the value 0 plus its addend, as the gABI defines for STN_UNDEF.
The Linux output imports such an entry as an unnamed weak symbol, which the
host loader resolves to 0. The Windows and macOS outputs write the value
into the slot instead of failing with "Empty import symbol name". Such
references are left out of the call registry. An unnamed symbol entry that
is not all zero still fails the relink.

OliSe Player (PPSA01153) has seven of these entries and calls through the
slots only when they are not 0 (#4437).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:24:56 +03:00
Dean c99cc11cf5
Merge pull request #4194 from fable-void/pr/rosetta-store-split
feat(relinker): split unaligned 256-bit stores for Rosetta
2026-10-13 01:22:45 +13:00
Dean 4d5fcef15b
Merge pull request #4203 from saxopa/fix/relinker-relative-section-symbol
fix(relinker): accept RELATIVE relocations against a zero-value section symbol
2026-10-13 01:21:34 +13:00