[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 07/10] exec: Add support for AArch64 executables

From: Sergey Bugaev
Subject: [PATCH 07/10] exec: Add support for AArch64 executables
Date: Sat, 23 Mar 2024 14:53:19 +0300

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.
 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);
       return EGRATUITOUS;      /* XXX */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]