From d8400c4394197317b722d6fa6aab47b1776f5176 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sat, 23 Mar 2024 14:53:19 +0300 Subject: exec: Add support for AArch64 executables This maps to EM_AARCH64. Just like the x86_64 branch, we only compile this code if CPU_TYPE_ARM64 is defined in Mach headers, to avoid raising Mach version requirement on other architectures; and we explicitly enable the branch when building for AArch64 itself, to get a build error if CPU_TYPE_ARM64 is somehow not defined. Message-ID: <20240323115322.69075-7-bugaevc@gmail.com> --- exec/hostarch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exec/hostarch.c b/exec/hostarch.c index ed50e0a8..81bbeb63 100644 --- a/exec/hostarch.c +++ b/exec/hostarch.c @@ -90,6 +90,11 @@ elf_machine_matches_host (ElfW(Half) e_machine) case CPU_TYPE_HPPA: CACHE (e_machine == EM_PARISC); +#if defined (CPU_TYPE_ARM64) || defined(__aarch64__) + case CPU_TYPE_ARM64: + CACHE (e_machine == EM_AARCH64); +#endif + default: return EGRATUITOUS; /* XXX */ } -- cgit v1.2.3