# HG changeset patch # User andrew # Date 1366230418 -3600 # Node ID 8ffc52aa2e4d440d68e3c52be97d69a9fa6a1d01 # Parent 04c3fb903cf39dba3480da331b5b2248c3f6a87e PR1378: Add AArch64 support to Zero diff -r 04c3fb903cf3 -r 8ffc52aa2e4d src/os/linux/vm/os_linux.cpp --- a/src/os/linux/vm/os_linux.cpp Tue May 28 19:43:58 2013 +0200 +++ b/src/os/linux/vm/os_linux.cpp Wed Apr 17 21:26:58 2013 +0100 @@ -132,6 +132,11 @@ #define SEC_IN_NANOSECS 1000000000LL #define LARGEPAGES_BIT (1 << 6) + +#ifndef EM_AARCH64 +#define EM_AARCH64 183 /* ARM AARCH64 */ +#endif + //////////////////////////////////////////////////////////////////////////////// // global variables julong os::Linux::_physical_memory = 0; @@ -1893,7 +1898,8 @@ {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_SH, EM_SH, ELFCLASS32, ELFDATA2LSB, (char*)"SH"} /* Support little endian only*/ + {EM_SH, EM_SH, ELFCLASS32, ELFDATA2LSB, (char*)"SH"}, /* Support little endian only*/ + {EM_AARCH64, EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"} /* Support little endian only*/ }; #if (defined IA32) @@ -1926,6 +1932,8 @@ static Elf32_Half running_arch_code=EM_68K; #elif (defined SH) static Elf32_Half running_arch_code=EM_SH; + #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, SH