From 96e24b508ab09591a8bd733a6482015bad80a2d6 Mon Sep 17 00:00:00 2001 From: TeamCemu Date: Wed, 19 Jun 2019 13:54:02 +0200 Subject: added magic bit0 alternative updated gitignore to ignore build / vs files --- src/elf_common/elf.h | 1 + src/elf_common/elf_reader.h | 2 +- src/wiiu/wiiu.cpp | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/elf_common/elf.h b/src/elf_common/elf.h index c556c95..73bca0d 100644 --- a/src/elf_common/elf.h +++ b/src/elf_common/elf.h @@ -108,6 +108,7 @@ typedef struct #define EI_MAG0 0 /* File identification byte 0 index */ #define ELFMAG0 0x7f /* Magic number byte 0 */ +#define ELFMAG0_ALT 0x7e /* Magic number byte 0 */ #define EI_MAG1 1 /* File identification byte 1 index */ #define ELFMAG1 'E' /* Magic number byte 1 */ diff --git a/src/elf_common/elf_reader.h b/src/elf_common/elf_reader.h index e85b3f4..ba4da5d 100644 --- a/src/elf_common/elf_reader.h +++ b/src/elf_common/elf_reader.h @@ -196,7 +196,7 @@ public: bool verifyHeader() { readHeader(); - if (m_header.e_ident[EI_MAG0] == ELFMAG0 && + if ((m_header.e_ident[EI_MAG0] == ELFMAG0 || m_header.e_ident[EI_MAG0] == ELFMAG0_ALT) && m_header.e_ident[EI_MAG1] == ELFMAG1 && m_header.e_ident[EI_MAG2] == ELFMAG2 && m_header.e_ident[EI_MAG3] == ELFMAG3) { diff --git a/src/wiiu/wiiu.cpp b/src/wiiu/wiiu.cpp index f470feb..505f652 100644 --- a/src/wiiu/wiiu.cpp +++ b/src/wiiu/wiiu.cpp @@ -16,7 +16,7 @@ static int idaapi *processor = "ppc"; *fileformatname = "WII U RPX/RPL"; - + return ACCEPT_FIRST | 1; } } @@ -40,14 +40,16 @@ static void idaapi } #ifdef _WIN32 +__declspec(dllexport) #endif loader_t LDSC = { IDP_INTERFACE_VERSION, - 0, + LDRF_REQ_PROC, accept_file, load_file, NULL, NULL, NULL -}; \ No newline at end of file +}; + -- cgit v1.3.1