nx_syscalls_x86_64.nx source
↩ module page · 22 lines · 1388 B
1// nx_syscalls_x86_64.nx -- ALIAS STUB (debt 1785528831, 2026-07-31).
2//
3// THE WRAPPER SET NOW LIVES ONCE, IN nx_syscalls.nx. This file remains only so the ~248
4// sources that `import "nx_syscalls_x86_64.nx"` keep resolving unchanged; the import layer
5// dedups by canonicalised path, so a translation unit reaching BOTH names now gets ONE
6// definition set instead of two. Same pattern as parse.nx -> nx_parse.nx.
7//
8// WHAT THIS FIXES: this module defined the full syscall wrapper set against RAW x86
9// numbers with no conditionals, while nx_syscalls.nx defines the SAME wrappers inside
10// @ifndef TARGET_X86_64 against RV64 numbers that the backend translates at emit. Any TU
11// reaching both held EVERY wrapper twice and resolved it SILENTLY BY DEFINITION ORDER --
12// nx_cc accepted the redefinition without a diagnostic (debt 1785447657). Reverse
13// import-reachability over 17499 sources measured 37 such files.
14//
15// ORDERING THAT MADE THIS SAFE (do not reorder if this is ever redone): the toolchain
16// carrying translator rows 40->165 mount and 51->161 chroot was promoted FIRST. Without
17// them the RV64 numbers pass through verbatim as x86 sendfile/getsockname -- measured,
18// $40 x3 / $51 x2 -- because x86ctx_rv64_to_x86_64_syscall's default branch is `return num`.
19//
20// Deprecation: delete when every consumer imports "nx_syscalls.nx" directly.
21
22import "nx_syscalls.nx"