I am porting Wine to macOS to run Windows on ARM (WOA) binaries. Windows PE files place .text and .data in the same page, which macOS’s JIT/W^X model cannot handle. pthread_jit_write_protect_np() cannot be used for foreign ARM64 code. Apple Silicon reserves x18, breaking the Windows ARM64 ABI. Wine also must reserve 0x7FFE0000 for the Windows TEB, but macOS cannot guarantee this address. These issues make it impossible for Wine to load or execute WOA binaries. I am requesting mechanisms to safely execute foreign ARM64 code, support mixed W/X pages, emulate x18, and reserve the Windows TEB region.
Branch is here: https://github.com/trcrsired/wine/tree/apple-silicon-mac-woa