cosmopolitan/tool
Justine Tunney 5bd22aef12
Experiment with supporting Windows Arm64 natively
So far I haven't found any way to run native Arm64 code on Windows Arm64
without using MSVC. When I build a PE binary from scratch that should be
a valid Windows Arm64 program, the OS refuses to run it. Possibly due to
requiring additional content like XML manifests or relocation or control
flow integrity data that isn't normally required on x64. I've also tried
using VirtualAlloc2() to JIT an Arm64 native function, but VirtualAlloc2
always fails with invalid parameter. I tried using MSVC to create an ARM
DLL that my x64 emulated program can link at runtime, to pass a function
pointer with ARM code, but LoadLibrary() rejects ARM DLLs as invalid exe

The only option left, is likely to write a new program like ape/ape-m1.c
which can be compiled by MSVC to load and run an AARCH64 ELF executable.
The emulated x64 binary would detect emulation using IsWow64Process2 and
then drop the loader executable in a temporary folder, and re-launch the
original executable, using the Arm64 segments of the cosmocc fat binary.
2024-08-16 06:43:59 -07:00
..
args Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
build Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
cosmocc Upgrade to superconfigure z0.0.51 2024-08-04 14:59:53 -07:00
curl Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
decode Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
emacs Allow -c to be specified with -E in cosmocc 2024-07-31 02:09:15 -07:00
hello Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
lambda Update Musl Libc code 2024-07-30 22:51:29 -07:00
net Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
plinko Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
scripts Refactor and improve CTL and other code 2024-06-04 05:45:48 -07:00
viz Make malloc scalable on all platforms 2024-08-15 23:32:53 -07:00
zsh Stop using .com extension in monorepo 2024-03-03 03:12:19 -08:00
BUILD.mk more modeline errata (#1019) 2023-12-16 23:07:10 -05:00