Commit Graph
1094 Commits
Author SHA1 Message Date
Adrià 2b5225605b Merge pull request #9719 from AasishDairelSahayaGrinspan/fix/relinker-gs-non-memory-operands
fix(relinker): leave GS-prefixed LEA and NOP instructions unchanged
2026-10-26 00:15:58 +01:00
Dean 1997e647f9 Merge pull request #10017 from SteelCrab/review-split/relinker-import-types
fix(relinker): preserve imported ELF symbol types
2026-10-26 12:11:16 +13:00
Dean dab64bbc52 Merge pull request #9375 from thakrarsagar/codex/relinker-output-path-cache
fix(relinker): avoid repeated output path canonicalization
2026-10-26 11:10:02 +13:00
Dean 905c3e2870 Merge pull request #10647 from Bram910/fix/call-site-hint-prefixes
fix(relinker): resolve BND and NOTRACK call sites
2026-10-26 11:09:02 +13:00
Dean 190aaa23bb Merge pull request #10564 from roboterspinne/fix/relinker-linux-overlapping-loads
fix(relinker): reject overlapping PT_LOAD segments in Linux output
2026-10-26 11:08:08 +13:00
Dean f2c8e1dda4 Merge pull request #9657 from jotitadev/fix/autorun-skip-noop-chmod
fix(relinker): leave an already executable autorun output's mode alone
2026-10-26 11:07:10 +13:00
Dean d4b8883fca Merge pull request #10393 from Bram910/fix/output-temporary-name-length
fix(io): stage long-named outputs with short temporary names
2026-10-26 11:01:21 +13:00
Dean 1926a56886 Merge pull request #9454 from cocoa55/fix/rewriter-branch-into-cut
fix(codegen): reject branches into a rewritten instruction
2026-10-26 11:00:51 +13:00
Dean 64a318c6bc Merge pull request #10424 from Oscar45397/fix/windows-working-directory-unwritten-peb
fix(tests): retry the Windows working directory read until the child has written it
2026-10-26 11:00:19 +13:00
Adrià 6bc1139698 Merge pull request #9184 from javierUDP/test/scalar-compare-execution
test(relinker): execute the moved scalar compare
2026-10-25 20:36:37 +01:00
Adrià 50bc72bbbc Merge pull request #9513 from harisibrar1/fix/windows-test-output-utf8
test(relinker): decode relinker output as UTF-8 in the path-checking tests
2026-10-25 20:31:26 +01:00
Adrià b1f023dda3 Merge pull request #9486 from harisibrar1/fix/relinker-dlltool-temp-prefix
build(relinker): give dlltool a short temporary prefix for the msvcrt import library
2026-10-25 19:29:55 +01:00
Dean 309912635e Merge pull request #10732 from roboterspinne/fix/relinker-guest-tls-export-references
fix(relinker): reject non-TLS guest relocations bound to a guest TLS export
2026-10-26 05:58:59 +13:00
Dean 6b1f419fef Merge pull request #10731 from roboterspinne/fix/relinker-guest-tls-special-sections
fix(relinker): reject guest TLS symbols in special sections
2026-10-26 05:57:35 +13:00
Dean d7493d7226 Merge pull request #10713 from Filip722/fix/reject-lock-movnts-20261024
fix(relinker): reject LOCK-prefixed MOVNTSS and MOVNTSD
2026-10-26 05:57:30 +13:00
Dean fe7e460568 Merge pull request #10752 from roboterspinne/fix/relinker-conflicting-dynamic-tags
fix(relinker): reject conflicting duplicates of the dynamic tags the pipeline reads
2026-10-26 05:49:08 +13:00
Dean 636a9c1eec Merge pull request #10730 from roboterspinne/fix/relinker-tls-relocations-empty-pt-tls
fix(relinker): require a non-empty PT_TLS for executable TLS relocations
2026-10-26 04:45:22 +13:00
Bram910 c265e51abf Merge main into fix/call-site-hint-prefixes 2026-10-25 13:01:17 +01:00
Dean 16ff208dc3 Merge pull request #10646 from roboterspinne/fix/relinker-executable-export-bounds
fix(relinker): reject executable exports outside PT_LOAD and PT_TLS memory
2026-10-26 00:03:56 +13:00
javierUDP 65a98e7f31 test(relinker): execute the moved scalar compare
The stub that moves a hazard scalar compare out of line is checked
through its bytes but never run, so nothing confirms that the compare
still produces the mask it would inline. The x86-64 execution section
now calls the stub for both outcomes of a CMPSS with an unsafe predicate
and checks the destination's lanes.
2026-10-25 11:28:03 +01:00
Dean 28d2a461d2 Merge pull request #10710 from roboterspinne/fix/relinker-windows-gs-branch-targets
fix(relinker): refuse branches into trapped guest GS instructions on Windows
2026-10-25 21:50:25 +13:00
Dean 268674d31c Merge pull request #10682 from ahmadmuj/fix/relinker-verify-frame-red-zone
fix(relinker): reject --frame-red-zone with --verify-patches
2026-10-25 21:50:21 +13:00
Dean 2f5013ec64 Merge pull request #10658 from roboterspinne/fix/relinker-reject-copy-relocations
fix(relinker): reject R_X86_64_COPY relocations
2026-10-25 21:50:12 +13:00
Dean 5aa203ba74 Merge pull request #9663 from AdnanKhan-ak47/feat/relinker-report-unconverted-needed
feat(relinker): report needed modules shipped outside the module directories
2026-10-25 21:50:08 +13:00
Dean 1da5d1a757 Merge pull request #10709 from roboterspinne/fix/relinker-executable-needed-names
fix(relinker): reject executable DT_NEEDED names the guest reader rejects
2026-10-25 21:37:44 +13:00
Adnan Khan 37c516ad2e fix(relinker): keep the needed-module report best-effort on traversal and status errors 2026-10-25 12:24:22 +05:30
Dean a512780d58 Merge pull request #10340 from Filip722/submit/lock-20261023
fix(relinker): reject LOCK-prefixed SIMD lowerings
2026-10-25 13:28:53 +13:00
Dean c4446bbb09 Merge pull request #9332 from rooklz/fix/windows-console-base
fix(relinker): prefer 0x400000 for Windows executables
2026-10-25 12:57:28 +13:00
Dean 38d463a6cf Merge pull request #10157 from Usama171/fix/relinker-preloaded-crt-log
fix(relinker): rebind a preloaded CRT's standard streams to the startup log
2026-10-25 12:45:29 +13:00
harisibrar1andClaude Opus 5.5 42961581e4 test(relinker): read the .desktop file as UTF-8 in input_preservation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 18:44:20 -04:00
harisibrar1 bae010daa7 Merge main c8d34aa8f4 into fix/relinker-dlltool-temp-prefix 2026-10-24 18:43:37 -04:00
harisibrar1 ce7a342d7b Merge main c8d34aa8f4 into fix/windows-test-output-utf8 2026-10-24 18:43:35 -04:00
roboterspinne 76e32bca2d fix(relinker): reject conflicting duplicates of the dynamic tags the pipeline reads
getTagValue returned the first entry of a dynamic tag, so an executable
with DT_RELASZ 0 followed by DT_RELASZ 24 converted for Linux with exit
0 and an output without DT_RELA, while the reverse order kept the
relocation. getTagValue now scans every entry and throws "Conflicting
duplicate <NAME> tags" when a tag it is asked for repeats with a
different value, the rule RelativeRelocationIndex already applies with
unused-filter=1. The pipeline check accepts a repeat with the same
value: it is not ambiguous, and #1938, which rejected it, was closed
because no title was shown and because rejecting it could refuse an
input the console loads. The code analysis on Windows and macOS and the
strict filter keep their own duplicate checks. Inputs without such a
conflict convert as before, and an input with one now fails with the
same message on every target.
2026-10-24 23:13:28 +02:00
roboterspinne 484cb7b539 fix(relinker): require a non-empty PT_TLS for executable TLS relocations
An executable's local TPOFF64, DTPOFF64 or DTPMOD64 relocation passed
whenever a PT_TLS header existed, so the Linux targets emitted it next
to a PT_TLS with p_memsz 0, while the Windows and macOS relocation
builder rejected the same input. glibc's ld.so sets up the main
program's TLS module only for a PT_TLS with p_memsz > 0, so such a
relocation has no block to resolve against. The pipeline now requires a
PT_TLS with a nonzero p_memsz and fails on every target with "TLS
relocation in an executable without a non-empty PT_TLS segment".
Relocations against imported TLS symbols are unchanged.
2026-10-24 21:42:14 +02:00
roboterspinne cd7b8bff00 fix(relinker): reject non-TLS guest relocations bound to a guest TLS export
A guest STT_NOTYPE import that resolved to another guest's STT_TLS
export was accepted when R_X86_64_64, R_X86_64_GLOB_DAT or
R_X86_64_JUMP_SLOT referenced it, and every target filled the slot
with an address that is not the variable. The gABI lets only TLS
relocations reference an STT_TLS symbol; the reader already rejects
such relocations against a TLS-typed import, and the builder rejects
OBJECT and FUNC imports of a TLS export as a type mismatch. The
builder now also rejects a referenced NOTYPE import of a guest TLS
export with "Non-TLS relocation against guest TLS export". These
inputs exit 2 on Linux, Windows and macOS instead of producing
outputs; unreferenced NOTYPE entries and TLS relocations are
unchanged.
2026-10-24 21:36:27 +02:00
roboterspinne 21127fe316 fix(relinker): reject guest TLS symbols in special sections
GuestImageReader rejected a defined symbol whose section index is
SHN_LORESERVE (0xff00) or higher, SHN_ABS excepted, only when it was
not STT_TLS, so a TLS symbol in SHN_ABS, SHN_COMMON, 0xff00 or
SHN_XINDEX was accepted. The Linux output kept it in .dynsym with that
section index, Windows and macOS failed only for an export outside
SHN_ABS, and both wrote st_value plus addend for a DTPOFF64 relocation
against a local one. The gABI gives a defined STT_TLS symbol its
assigned TLS offset and no meaning in a special section index, so
every such symbol now fails with "Unsupported special symbol section"
before the TLS bounds check. SHN_ABS stays accepted for other symbol
types.
2026-10-24 21:33:20 +02:00
muaus 91bd250e98 test(relinker): wait for the terminated child to leave the process snapshot 2026-10-25 00:10:24 +05:00
Filip Michalski 50dc1c93c8 fix(relinker): reject LOCK-prefixed MOVNTSS and MOVNTSD 2026-10-24 20:43:16 +02:00
Filip Michalski cfa8c10d21 fix(relinker): clarify LOCK SHA failures and cover conversion 2026-10-24 20:43:14 +02:00
roboterspinne 0ba2ca7982 fix(relinker): reject executable DT_NEEDED names the guest reader rejects
The pipeline read an executable's DT_NEEDED names with readCStr and
checked only bounds and the NUL terminator, so without bundled modules
an empty name, $LIB.prx, a:b.prx or a name with CR or LF relinked with
exit 0 and reached the Linux DT_NEEDED unchanged, while the Windows and
macOS outputs each rejected a different subset. The DT_NEEDED loop now
applies the rule GuestImageReader applies to a module's DT_NEEDED: a
name is not empty and contains no backslash, colon, dollar, CR or LF; a
slash stays allowed. Such an executable now fails on every target with
"Invalid dependency: <name>" at the name's file offset, and outputs for
valid names do not change.
2026-10-24 20:20:26 +02:00
roboterspinne 7424949b8b fix(relinker): refuse branches into trapped guest GS instructions on Windows
Windows output replaced each guest GS memory instruction with UD2 and
NOP fill without checking the decoded direct branch targets, so a branch
past the first byte of such an instruction was converted and landed in
the second UD2 byte or the NOP fill. A branch target strictly inside a
trapped GS instruction is now refused with "Branch enters a guest GS
instruction", the rule macOS applies since #7706 and this builder
already applies to its FS rewrites. The branch targets are sorted before
the trap loop, which runs before the PT_TLS early returns, so images
without PT_TLS are covered; guest modules go through the same builder. A
branch to the first byte still converts and reaches the UD2.
2026-10-24 20:18:50 +02:00
Ahmad Mujahid 73a681b488 fix(relinker): reject --frame-red-zone with --verify-patches 2026-10-24 21:33:31 +04:00
Adrià d01070d6c3 Merge pull request #5640 from EagleBearerYS/feat/relinker-frame-frameless-leaves
feat(relinker): frame red-zone leaves without a frame pointer by moving their rsp operands
2026-10-24 18:14:53 +02:00
Dean 5c90b0a65e Merge pull request #9228 from savvaniss/feat/log-deferred-imported-modules
feat(relinker): log deferred Windows modules the executable imports from
2026-10-25 05:10:41 +13:00
Bram910 7151c6c090 docs(relinker): clarify call-site analysis limits 2026-10-24 18:08:46 +02:00
muaus 214792139f test(relinker): start the stub-after-CRT log case from a stale anyps5.log 2026-10-24 21:01:09 +05:00
muausandClaude Fable 5 eeaf7b03b5 fix(relinker): open the startup log for append so stub writes cannot clobber CRT output
Co-Authored-By: Claude Fable 5 <[email protected]>
2026-10-24 20:30:27 +05:00
roboterspinne 7f58c7a407 fix(relinker): reject R_X86_64_COPY relocations
The Linux output writes every import symbol with st_size 0 and copies
a COPY relocation into the output unchanged, so ld.so copies
MIN(st_size of the definition, 0) = 0 bytes and the variable stays
zero. Windows and macOS already rejected the type in the relocation
builder. ValidationPolicy now rejects type 5 before any target code,
so every target reports the same error, and the COPY case of the
fixed-base rebasing, which validation makes unreachable, is gone.
2026-10-24 17:16:23 +02:00
Rookie 39df8e081c fix(relinker): prefer 0x400000 for Windows executables 2026-10-24 15:58:35 +01:00
Dean a8c8b8117b Merge pull request #8900 from WhiteAssassins/feat/patch-advisor
feat(tools): recommend verified local game patches
2026-10-25 03:51:47 +13:00