changeset 10843:308ed1ae8a75

8253036: Support building the Zero assembler port on AArch64 Summary: Add recognition of the ELF format on AArch64 to allow Zero builds on the platform. Reviewed-by: shade
author andrew
date Mon, 26 Oct 2020 07:04:41 +0000
parents de90eec825b4
children a9ac254e093c
files src/os/linux/vm/os_linux.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp	Tue Mar 26 13:25:26 2019 -0700
+++ b/src/os/linux/vm/os_linux.cpp	Mon Oct 26 07:04:41 2020 +0000
@@ -1950,6 +1950,9 @@
   #ifndef EM_486
   #define EM_486          6               /* Intel 80486 */
   #endif
+  #ifndef EM_AARCH64
+  #define EM_AARCH64    183               /* ARM AARCH64 */
+  #endif
 
   static const arch_t arch_array[]={
     {EM_386,         EM_386,     ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
@@ -1971,7 +1974,8 @@
     {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"},
     {EM_MIPS,        EM_MIPS,    ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"},
     {EM_PARISC,      EM_PARISC,  ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
-    {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}
+    {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
+    {EM_AARCH64,     EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"},
   };
 
   #if  (defined IA32)
@@ -2002,6 +2006,8 @@
     static  Elf32_Half running_arch_code=EM_MIPS;
   #elif  (defined M68K)
     static  Elf32_Half running_arch_code=EM_68K;
+  #elif  (defined AARCH64)
+    static  Elf32_Half running_arch_code=EM_AARCH64;
   #else
     #error Method os::dll_load requires that one of following is defined:\
          IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K