diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/plugins/elf-loader.cpp | 5 | ||||
-rw-r--r-- | backends/plugins/elf-loader.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/backends/plugins/elf-loader.cpp b/backends/plugins/elf-loader.cpp index afb69714fa..33f97f5586 100644 --- a/backends/plugins/elf-loader.cpp +++ b/backends/plugins/elf-loader.cpp @@ -93,7 +93,12 @@ bool DLObject::readElfHeader(Common::SeekableReadStream* DLFile, Elf32_Ehdr *ehd if (DLFile->read(ehdr, sizeof(*ehdr)) != sizeof(*ehdr) || memcmp(ehdr->e_ident, ELFMAG, SELFMAG) || // Check MAGIC ehdr->e_type != ET_EXEC || // Check for executable +#ifdef ARM_TARGET ehdr->e_machine != EM_ARM || // Check for ARM machine type +#endif +#ifdef MIPS_TARGET + ehdr->e_machine != EM_MIPS || +#endif ehdr->e_phentsize < sizeof(Elf32_Phdr) || // Check for size of program header ehdr->e_shentsize != sizeof(Elf32_Shdr)) { // Check for size of section header seterror("Invalid file type."); diff --git a/backends/plugins/elf-loader.h b/backends/plugins/elf-loader.h index 1bbcbc4b78..3f33b681bf 100644 --- a/backends/plugins/elf-loader.h +++ b/backends/plugins/elf-loader.h @@ -34,6 +34,10 @@ #include "shorts-segment-manager.h" #endif +#if defined(__DS__) +#define ARM_TARGET +#endif + #define MAXDLERRLEN 80 class DLObject { |