From 6b5667debcb8ea6d3da88692a6c51049a2c6013d Mon Sep 17 00:00:00 2001 From: Ahelenia Ziemiańska Date: Fri, 9 Oct 2020 17:40:07 +0200 Subject: x86_64: allow ELFCLASS32 for x32 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ahelenia Ziemiańska Signed-off-by: Simon Horman --- kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c index db85b443..0d22f3b1 100644 --- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c +++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c @@ -8,7 +8,8 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) if (ehdr->ei_data != ELFDATA2LSB) { return 0; } - if (ehdr->ei_class != ELFCLASS64) { + if (ehdr->ei_class != ELFCLASS64 && + ehdr->ei_class != ELFCLASS32) { /* x32 */ return 0; } if (ehdr->e_machine != EM_X86_64) { -- cgit 1.2.3-korg