From 98dbe5aca8c328b40a0598d6ab478d9b869d1b5c Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Sat, 29 Aug 2015 12:07:50 -0700 Subject: elf: Update EM_MOXIE definition EM_MOXIE now has a proper assigned elf code. Use it. Register the old interim value as EM_MOXIE_OLD and accept either in elf loading. Cc: Anthony Green Reviewed-by: Richard Henderson Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- include/hw/elf_ops.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/hw/elf_ops.h') diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h index 0d41f249a0..0010c441d9 100644 --- a/include/hw/elf_ops.h +++ b/include/hw/elf_ops.h @@ -305,6 +305,14 @@ static int glue(load_elf, SZ)(const char *name, int fd, } } break; + case EM_MOXIE: + if (ehdr.e_machine != EM_MOXIE) { + if (ehdr.e_machine != EM_MOXIE_OLD) { + ret = ELF_LOAD_WRONG_ARCH; + goto fail; + } + } + break; default: if (elf_machine != ehdr.e_machine) { ret = ELF_LOAD_WRONG_ARCH; -- cgit v1.2.3