summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kexec/kexec-elf-exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kexec/kexec-elf-exec.c b/kexec/kexec-elf-exec.c
index bea7b3e3..b3376427 100644
--- a/kexec/kexec-elf-exec.c
+++ b/kexec/kexec-elf-exec.c
@@ -39,12 +39,13 @@ static int get_elf_exec_load_base(struct mem_ehdr *ehdr, struct kexec_info *info
unsigned long first, last;
size_t i;
- /* Note on arm64:
+ /* Note on arm64 and loongarch64:
* 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.
+ * This is also applies to LoongArch.
*/
- if (ehdr->e_machine == EM_AARCH64)
+ if (ehdr->e_machine == EM_AARCH64 || ehdr->e_machine == EM_LOONGARCH)
return 0;
first = ULONG_MAX;