[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);
+#endif
+
default:
return EGRATUITOUS; /* XXX */
}
--
2.44.0
- [PATCH 01/10] term: Fix function prototype, Sergey Bugaev, 2024/03/23
- [PATCH 02/10] exec: Fix creating executable stacks, Sergey Bugaev, 2024/03/23
- [PATCH 04/10] proc: Only try host_kernel_version () on i386, Sergey Bugaev, 2024/03/23
- [PATCH 05/10] libshouldbeinlibc: Stop relying on address space size, Sergey Bugaev, 2024/03/23
- [PATCH 03/10] Make long & friends 64-bit on 64-bit platforms, Sergey Bugaev, 2024/03/23
- [PATCH 06/10] exec: Stop relying on address space size, Sergey Bugaev, 2024/03/23
- [PATCH 09/10] proc: Add support for AArch64 in uname, Sergey Bugaev, 2024/03/23
- [PATCH 07/10] exec: Add support for AArch64 executables,
Sergey Bugaev <=
- [PATCH 10/10] boot: Add support for AArch64, Sergey Bugaev, 2024/03/23
- [PATCH 08/10] elfcore: Add support for saving AArch64 registers, Sergey Bugaev, 2024/03/23
- Re: [PATCH 01/10] term: Fix function prototype, Samuel Thibault, 2024/03/23