summaryrefslogtreecommitdiff
path: root/kexec/kexec-elf-exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/kexec-elf-exec.c')
-rw-r--r--kexec/kexec-elf-exec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kexec/kexec-elf-exec.c b/kexec/kexec-elf-exec.c
index cb62d04..a9329ac 100644
--- a/kexec/kexec-elf-exec.c
+++ b/kexec/kexec-elf-exec.c
@@ -63,9 +63,13 @@ int elf_exec_load(struct mem_ehdr *ehdr, struct kexec_info *info)
/* If I have a dynamic executable find it's size
* and then find a location for it in memory.
+ * Note on arm64:
+ * arm64's vmlinux has virtual address in physical address
+ * field of PT_LOAD segments. So the following validity check
+ * and relocation makes no sense on arm64.
*/
base = 0;
- if (ehdr->e_type == ET_DYN) {
+ if ((ehdr->e_machine != EM_AARCH64) && (ehdr->e_type == ET_DYN)) {
unsigned long first, last, align;
first = ULONG_MAX;
last = 0;