[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] elf: Allow loading AArch64 ELF files
From: |
Aaron Lindsay OS |
Subject: |
[Qemu-devel] [PATCH] elf: Allow loading AArch64 ELF files |
Date: |
Mon, 12 Aug 2019 14:46:26 +0000 |
Treat EM_AARCH64 as a valid value when checking the ELF's machine-type
header.
Signed-off-by: Aaron Lindsay <address@hidden>
---
include/hw/elf_ops.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h
index 690f9238c8..f12faa90a1 100644
--- a/include/hw/elf_ops.h
+++ b/include/hw/elf_ops.h
@@ -381,6 +381,12 @@ static int glue(load_elf, SZ)(const char *name, int fd,
goto fail;
}
break;
+ case EM_AARCH64:
+ if (ehdr.e_machine != EM_AARCH64) {
+ ret = ELF_LOAD_WRONG_ARCH;
+ goto fail;
+ }
+ break;
default:
if (elf_machine != ehdr.e_machine) {
ret = ELF_LOAD_WRONG_ARCH;
--
2.17.1
- [Qemu-devel] [PATCH] elf: Allow loading AArch64 ELF files,
Aaron Lindsay OS <=