diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/elf.h | 3 | ||||
-rw-r--r-- | include/hw/elf_ops.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h index 79859f0cd8..66add810df 100644 --- a/include/elf.h +++ b/include/elf.h @@ -135,6 +135,9 @@ typedef int64_t Elf64_Sxword; #define EM_TILEGX 191 /* TILE-Gx */ +#define EM_MOXIE 223 /* Moxie processor family */ +#define EM_MOXIE_OLD 0xFEED + /* This is the info that is needed to parse the dynamic section of the file */ #define DT_NULL 0 #define DT_NEEDED 1 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; |