xml: support ARM64 architecture code
authorEric Biggers <ebiggers3@gmail.com>
Sat, 2 Jan 2016 22:28:52 +0000 (16:28 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 2 Jan 2016 22:28:52 +0000 (16:28 -0600)
src/xml.c
src/xml_windows.c

index 20c9abd..6ce578d 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -863,6 +863,7 @@ xml_delete_image(struct wim_xml_info *info, int image)
 #define PROCESSOR_ARCHITECTURE_MSIL            8
 #define PROCESSOR_ARCHITECTURE_AMD64           9
 #define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64   10
+#define PROCESSOR_ARCHITECTURE_ARM64           12
 
 static const tchar *
 describe_arch(u64 arch)
@@ -873,6 +874,7 @@ describe_arch(u64 arch)
                [PROCESSOR_ARCHITECTURE_ARM]   = T("ARM"),
                [PROCESSOR_ARCHITECTURE_IA64]  = T("ia64"),
                [PROCESSOR_ARCHITECTURE_AMD64] = T("x86_64"),
+               [PROCESSOR_ARCHITECTURE_ARM64] = T("ARM64"),
        };
 
        if (arch < ARRAY_LEN(descriptions) && descriptions[arch] != NULL)
index a45eeae..03ccd0e 100644 (file)
@@ -372,12 +372,14 @@ language_id_to_name(u16 id)
 #define IMAGE_FILE_MACHINE_THUMB       0x01C2
 #define IMAGE_FILE_MACHINE_IA64                0x0200
 #define IMAGE_FILE_MACHINE_AMD64       0x8664
+#define IMAGE_FILE_MACHINE_ARM64       0xAA64
 
 /* Windows API processor architecture codes (common ones only)  */
 #define PROCESSOR_ARCHITECTURE_INTEL   0
 #define PROCESSOR_ARCHITECTURE_ARM     5
 #define PROCESSOR_ARCHITECTURE_IA64    6
 #define PROCESSOR_ARCHITECTURE_AMD64   9
+#define PROCESSOR_ARCHITECTURE_ARM64   12
 
 /* Translate a processor architecture code as given in a PE binary to the code
  * used by the Windows API.  Returns -1 if the code is not recognized.  */
@@ -395,6 +397,8 @@ pe_arch_to_windows_arch(unsigned pe_arch)
                return PROCESSOR_ARCHITECTURE_IA64;
        case IMAGE_FILE_MACHINE_AMD64:
                return PROCESSOR_ARCHITECTURE_AMD64;
+       case IMAGE_FILE_MACHINE_ARM64:
+               return PROCESSOR_ARCHITECTURE_ARM64;
        }
        return -1;
 }