cosmopolitan/libc/nt
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
..
advapi32 Make improvements 2024-02-12 10:23:00 -08:00
API-MS-Win-Core-Memory-l1-1-6 Make some new Windows 10 memory APIs available 2024-07-19 22:26:49 -07:00
API-MS-Win-Core-Synch-l1-2-0 Add OpenMP support 2024-01-28 22:39:02 -08:00
BCryptPrimitives Make improvements 2024-02-12 10:23:00 -08:00
comdlg32 Add OpenMP support 2024-01-28 22:39:02 -08:00
enum Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
gdi32 Add OpenMP support 2024-01-28 22:39:02 -08:00
iphlpapi Add OpenMP support 2024-01-28 22:39:02 -08:00
kernel32 Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
nt Reduce header complexity 2023-11-28 14:39:42 -08:00
ntdll Add OpenMP support 2024-01-28 22:39:02 -08:00
pdh Add OpenMP support 2024-01-28 22:39:02 -08:00
PowrProf Add OpenMP support 2024-01-28 22:39:02 -08:00
psapi Add OpenMP support 2024-01-28 22:39:02 -08:00
struct Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
thunk Walk back most uses of __STRICT_ANSI__ 2024-02-27 04:09:49 -08:00
typedef Reduce header complexity 2023-11-28 14:39:42 -08:00
user32 Add OpenMP support 2024-01-28 22:39:02 -08:00
ws2_32 Add OpenMP support 2024-01-28 22:39:02 -08:00
accounting.h Reduce header complexity 2023-11-28 14:39:42 -08:00
automation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Make some new Windows 10 memory APIs available 2024-07-19 22:26:49 -07:00
codegen.h Make improvements 2020-12-01 03:43:40 -08:00
codegen.sh more modeline errata (#1019) 2023-12-16 23:07:10 -05:00
comdlg.h Reduce header complexity 2023-11-28 14:39:42 -08:00
comms.h Reduce header complexity 2023-11-28 14:39:42 -08:00
console.h Add WIN32 pseudo console APIs 2023-12-10 01:29:25 -08:00
createfile.h Reduce header complexity 2023-11-28 14:39:42 -08:00
debug.h Reduce header complexity 2023-11-28 14:39:42 -08:00
dll.h Resurrect <windows.h> as <windowsesque.h> 2024-02-21 16:41:11 -08:00
efi.h Reduce header complexity 2023-11-28 14:39:42 -08:00
errors.h Run clang-format on most sources 2023-04-27 05:44:32 -07:00
events.h Resurrect <windows.h> as <windowsesque.h> 2024-02-21 16:41:11 -08:00
files.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iocp.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ipc.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iphlpapi.h Reduce header complexity 2023-11-28 14:39:42 -08:00
master.sh Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
memory.h Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
messagebox.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ntdll.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ntdllimport.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
ntdllimport.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
paint.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pdh.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pedef.internal.h Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
privilege.h Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
process.h Reduce header complexity 2023-11-28 14:39:42 -08:00
registry.h Reduce header complexity 2023-11-28 14:39:42 -08:00
runtime.h Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
signals.h Reduce header complexity 2023-11-28 14:39:42 -08:00
startupinfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
synchronization.h Introduce getcpu() system call from glibc 2024-02-21 18:17:20 -08:00
system.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systeminfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sysv2nt.S Fix more vi modelines (#1006) 2023-12-13 02:28:11 -05:00
thread.h Reduce header complexity 2023-11-28 14:39:42 -08:00
time.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
windows.h Reduce header complexity 2023-11-28 14:39:42 -08:00
winsock.h Reduce header complexity 2023-11-28 14:39:42 -08:00