diff --git a/Core/ELF/ElfReader.cpp b/Core/ELF/ElfReader.cpp index 1ec733f76e..6b17128c48 100644 --- a/Core/ELF/ElfReader.cpp +++ b/Core/ELF/ElfReader.cpp @@ -69,18 +69,18 @@ bool ElfReader::LoadRelocations(Elf32_Rel *rels, int numRelocs) //0 = code //1 = data - if (readwrite >= ARRAY_SIZE(segmentVAddr)) { + if (readwrite >= (int)ARRAY_SIZE(segmentVAddr)) { if (numErrors < 10) { - ERROR_LOG(LOADER, "Bad segment number %i", readwrite); + ERROR_LOG_REPORT(LOADER, "Bad segment number %i", readwrite); } numErrors++; continue; } addr += segmentVAddr[readwrite]; - if ((addr & 3) || !Memory::IsValidAddress(addr)) { + if (((addr & 3) && type != R_MIPS_32) || !Memory::IsValidAddress(addr)) { if (numErrors < 10) { - WARN_LOG(LOADER, "Suspicious address %08x, skipping reloc", addr); + WARN_LOG_REPORT(LOADER, "Suspicious address %08x, skipping reloc, type = %d", addr, type); } else if (numErrors == 10) { WARN_LOG(LOADER, "Too many bad relocations, skipping logging"); }