Recompile an x64 caller through a named PE import and verify loader errors #27

Manually merged
github merged 2 commits from gh-pr/27/head into gh-pr/27/base 2026-11-26 21:22:57 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-21 09:55 UTC · original
R0Y00:codex/cpu-import-call → main · +251 −25 · 9 files · 2 commits · merged 2026-11-21 09:59 UTC

Fixes #24. Decode an FF 15 RIP-relative call, match the computed slot against ordinary PE import records and verify the named provider export against the configured fixture ABI. Compile the generated caller with a DLL import and link its provider's import library. Both linked call sites are checked against their own IAT slots.

The Windows fixture compares the original and translated caller on 249 input pairs against an independent arithmetic reference, including the arguments written by the provider, guarded output, RBX/RSI and returns. Replacing only the provider changes the return on all 249 pairs. Separate processes check loader errors 126 for a missing DLL and 127 for a missing export on both callers. Static controls reject both unresolved providers and a displacement one byte into an IAT entry.

Local ctest --preset dev --no-tests=error -E '_hardware$' completed with 37 passes and one WARP wave64 capability skip. README and experiment notes document the measured scope and reproduction command. Refs #26 for ordinal-only imports.

**@⁠R0Y00** on GitHub · 2026-11-21 09:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/27) `R0Y00:codex/cpu-import-call` → `main` · +251 −25 · 9 files · 2 commits · merged 2026-11-21 09:59 UTC Fixes #24. Decode an FF 15 RIP-relative call, match the computed slot against ordinary PE import records and verify the named provider export against the configured fixture ABI. Compile the generated caller with a DLL import and link its provider's import library. Both linked call sites are checked against their own IAT slots. The Windows fixture compares the original and translated caller on 249 input pairs against an independent arithmetic reference, including the arguments written by the provider, guarded output, RBX/RSI and returns. Replacing only the provider changes the return on all 249 pairs. Separate processes check loader errors 126 for a missing DLL and 127 for a missing export on both callers. Static controls reject both unresolved providers and a displacement one byte into an IAT entry. Local `ctest --preset dev --no-tests=error -E '_hardware$'` completed with 37 passes and one WARP wave64 capability skip. README and experiment notes document the measured scope and reproduction command. Refs #26 for ordinal-only imports.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:22:56 +00:00
github manually merged commit 83c7d77724 into gh-pr/27/base 2026-11-26 21:22:57 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.