added magic bit0 alternative

updated gitignore to ignore build / vs files
This commit is contained in:
TeamCemu 2019-06-19 13:54:02 +02:00
parent a004b8b249
commit 96e24b508a
4 changed files with 10 additions and 5 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
/src/ps3/build/
/src/vita/build/
/src/wiiu/build/
/.vs
/build

View file

@ -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 */

View file

@ -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) {

View file

@ -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
};