[SDK][XDK] Add more definitions for ARM64 and start fixing PE binaries (#4142)

- Add context structure and definitions, NEON128 structure,
  runtime function entry, dispatcher context, scope table

All definitions are based on the latest SDK for arm64.

[SDK] Use _TARGET_PE64 in the pefixup

[GENINC] Add AA64 identifier for ARM64 PE binaries

CORE-17518
This commit is contained in:
Justin Miller 2021-12-09 06:54:16 -08:00 committed by GitHub
parent 6dfc13e411
commit b1fca7ea55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 149 additions and 2 deletions

View file

@ -50,7 +50,7 @@ if(NOT MSVC)
add_subdirectory(rsym)
add_host_tool(pefixup pefixup.c)
if (ARCH STREQUAL "amd64")
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
endif()
target_link_libraries(pefixup PRIVATE host_includes)

View file

@ -10,6 +10,7 @@
#define IMAGE_FILE_MACHINE_I386 0x014c
#define IMAGE_FILE_MACHINE_AMD64 0x8664
#define IMAGE_FILE_MACHINE_ARMNT 0x01c4
#define IMAGE_FILE_MACHINE_ARM64 0xaa64
#ifdef _MSC_VER
#define PRIx64 "I64x"
@ -117,7 +118,8 @@ int main(int argc, char* argv[])
if ((Machine != IMAGE_FILE_MACHINE_I386) &&
(Machine != IMAGE_FILE_MACHINE_AMD64) &&
(Machine != IMAGE_FILE_MACHINE_ARMNT))
(Machine != IMAGE_FILE_MACHINE_ARMNT) &&
(Machine != IMAGE_FILE_MACHINE_ARM64))
{
fprintf(stderr, "Invalid Machine: 0x%x.\n", Machine);
goto quit;