cosmopolitan/libc/nt/struct
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
..
acl.h Reduce header complexity 2023-11-28 14:39:42 -08:00
afd.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ansistring.h Reduce header complexity 2023-11-28 14:39:42 -08:00
arm64.h Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
byhandlefileinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
charinfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
clientid.h Reduce header complexity 2023-11-28 14:39:42 -08:00
consolecursorinfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
consolescreenbufferinfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
consolescreenbufferinfoex.h Reduce header complexity 2023-11-28 14:39:42 -08:00
consoleselectioninfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
context.h Reduce header complexity 2023-11-28 14:39:42 -08:00
coord.h Reduce header complexity 2023-11-28 14:39:42 -08:00
criticalsection.h Reduce header complexity 2023-11-28 14:39:42 -08:00
criticalsectiondebug.h Reduce header complexity 2023-11-28 14:39:42 -08:00
drawtextparams.h Reduce header complexity 2023-11-28 14:39:42 -08:00
dynamictimezoneinformation.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
editmenu.h Reduce header complexity 2023-11-28 14:39:42 -08:00
exceptionframe.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fdset.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileaccessinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filealignmentinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileallinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileallocationinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileattributetaginformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filebasicinfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filebasicinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filebothdirectoryinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filecompressioninfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filedirectoryinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filedispositioninformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileeainformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileendoffileinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filefsfullsizeinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filefulldirectoryinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filefulleainformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fileinternalinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filemailslotqueryinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filemailslotsetinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filemodeinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filenameinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filenamesinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filenetworkopeninformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filepipelocalinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filepositioninformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filerenameinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filesegmentelement.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filestandardinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filestreaminformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filetime.h Reduce header complexity 2023-11-28 14:39:42 -08:00
filezerodatainformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fpodata.h Reduce header complexity 2023-11-28 14:39:42 -08:00
genericmapping.h Reduce header complexity 2023-11-28 14:39:42 -08:00
guid.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagearchivememberheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageauxsymbol.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageauxsymbolex.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageauxsymboltokendef.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagebaserelocation.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageboundforwarderref.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageboundimportdescriptor.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageceruntimefunctionentry.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagecoffsymbolsheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedatadirectory.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedebugdirectory.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedebugmisc.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedelayloaddescriptor.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedosheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedynamicrelocation.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedynamicrelocationtable.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagedynamicrelocationv2.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageenclaveconfig.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageenclaveimport.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageepiloguedynamicrelocationheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageexportdirectory.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagefileheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagehotpatchbase.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagehotpatchhashes.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagehotpatchinfo.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageimportbyname.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageimportdescriptor.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagelinenumber.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageloadconfigcodeintegrity.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageloadconfigdirectory.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagentheaders.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageoptionalheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageprologuedynamicrelocationheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagerelocation.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageresourcedataentry.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageresourcedirectory.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageresourcedirectoryentry.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageresourcedirstring.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageromoptionalheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageruntimefunctionentry.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagesectionheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imageseparatedebugheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagesymbol.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagesymbolex.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagethunkdata.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
imagetlsdirectory.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
importobjectheader.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
inputrecord.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iocounters.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iostatusblock.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iovec.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ipadapteraddresses.h Reduce header complexity 2023-11-28 14:39:42 -08:00
kernelusertimes.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ldr.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ldrdatatableentry.h Reduce header complexity 2023-11-28 14:39:42 -08:00
linger.h Reduce header complexity 2023-11-28 14:39:42 -08:00
linkedlist.h Reduce header complexity 2023-11-28 14:39:42 -08:00
luid.h Reduce header complexity 2023-11-28 14:39:42 -08:00
luidandattributes.h Reduce header complexity 2023-11-28 14:39:42 -08:00
memextendedparameter.h Experiment with supporting Windows Arm64 natively 2024-08-16 06:43:59 -07:00
memorybasicinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
memoryrangeentry.h Reduce header complexity 2023-11-28 14:39:42 -08:00
memorystatusex.h Reduce header complexity 2023-11-28 14:39:42 -08:00
msg.h Reduce header complexity 2023-11-28 14:39:42 -08:00
nonpageddebuginfo.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ntexceptionpointers.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ntexceptionrecord.h Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
objectallinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
objectattributes.h Reduce header complexity 2023-11-28 14:39:42 -08:00
objectbasicinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
objectnameinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
objecttypeinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
openfilename.h Reduce header complexity 2023-11-28 14:39:42 -08:00
overlapped.h Reduce header complexity 2023-11-28 14:39:42 -08:00
overlappedentry.h Reduce header complexity 2023-11-28 14:39:42 -08:00
paintstruct.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pdhfmtcountervalue.h Reduce header complexity 2023-11-28 14:39:42 -08:00
point.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pollfd.h Reduce header complexity 2023-11-28 14:39:42 -08:00
privilegeset.h Reduce header complexity 2023-11-28 14:39:42 -08:00
processbasicinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
processentry32.h Reduce header complexity 2023-11-28 14:39:42 -08:00
processinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
processmemorycounters.h Reduce header complexity 2023-11-28 14:39:42 -08:00
processornumber.h Add OpenMP support 2024-01-28 22:39:02 -08:00
procthreadattributelist.h Get Cosmopolitan into releasable state 2020-11-25 08:19:00 -08:00
rect.h Reduce header complexity 2023-11-28 14:39:42 -08:00
reparsedatabuffer.h Reduce header complexity 2023-11-28 14:39:42 -08:00
rtluserprocessinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
rtluserprocessparameters.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sectionimageinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
securityattributes.h Reduce header complexity 2023-11-28 14:39:42 -08:00
securitydescriptor.h Reduce header complexity 2023-11-28 14:39:42 -08:00
size.h Reduce header complexity 2023-11-28 14:39:42 -08:00
smallrect.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
startupinfoex.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systembasicinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemexceptioninformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemhandleentry.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemhandleinformation.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
systeminterruptinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemlookasideinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemperformanceinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemprocessinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemprocessorinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemprocessorperformanceinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemregistryquotainformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemthreads.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemtime.h Reduce header complexity 2023-11-28 14:39:42 -08:00
systemtimeofdayinformation.h Reduce header complexity 2023-11-28 14:39:42 -08:00
timeval.h Reduce header complexity 2023-11-28 14:39:42 -08:00
timezoneinformation.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
tokenprivileges.h Reduce header complexity 2023-11-28 14:39:42 -08:00
unicodestring.h Reduce header complexity 2023-11-28 14:39:42 -08:00
userstack.h Reduce header complexity 2023-11-28 14:39:42 -08:00
valent.h Reduce header complexity 2023-11-28 14:39:42 -08:00
vmcounters.h Reduce header complexity 2023-11-28 14:39:42 -08:00
win32fileattributedata.h Reduce header complexity 2023-11-28 14:39:42 -08:00
win32finddata.h Reduce header complexity 2023-11-28 14:39:42 -08:00
windowplacement.h Reduce header complexity 2023-11-28 14:39:42 -08:00
wndclass.h Reduce header complexity 2023-11-28 14:39:42 -08:00
wndclassex.h Reduce header complexity 2023-11-28 14:39:42 -08:00