cpu: recompile a source-built EXE entry through a named DLL import #228
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!228
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/228/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@R0Y00 on GitHub · 2026-11-21 18:48 UTC · original
R0Y00:codex/exe-entry-aot→main· +267 −2 · 7 files · 1 commits · merged 2026-11-21 18:50 UTCCloses #210. Refs #165.
The source-built x64 EXE reads one selector byte at its CRT-free PE entry. The translator follows the entry's relative call into the existing MASM caller, resolves its named IAT slot against the existing mix_args provider, and emits both functions as C++. Windows launches the native fixture and the translated program in separate processes.
The Windows CTest compares each native result to the table and each translation to its native reference. A second assembly build changes the selector from JZ to JNZ. Translating it swaps the expected arguments, output bytes and exit status on both inputs. Empty stdin returns 2 with empty output streams across all four programs.
Reproduced locally with:
Thanks to @yummancito for the native child-process baseline in #165. This fixture reuses the existing public call_mix and mix_args sources and the 0x60d reference exit. The generated EXE uses the host C++ startup. #165 continues to cover mapped process startup and TLS.