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

Merged
R0Y00 merged 2 commits from upstream-pr/27 into main 2026-11-21 09:59:56 +00:00
R0Y00 commented 2026-11-21 09:55:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T09:55:02Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6527329256 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/27). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T09:55:02Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:41:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!27
No description provided.