From edeb858138ed1a2c4dc865d631675b38bf7f4315 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 7 Jun 2018 06:17:47 -0500 Subject: [PATCH] loader: ignore invalid index_value and allow relative reloc 10 --- rpcs3/Emu/Cell/PPUModule.cpp | 2 +- rpcs3/Emu/Cell/PPUTranslator.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index e4da47edac..91a9e80264 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -833,7 +833,7 @@ std::shared_ptr ppu_load_prx(const ppu_prx_object& elf, const std::stri ppu_reloc _rel; const u32 raddr = _rel.addr = vm::cast(prx->segs.at(rel.index_addr).addr + rel.offset, HERE); const u32 rtype = _rel.type = rel.type; - const u64 rdata = _rel.data = prx->segs.at(rel.index_value).addr + rel.ptr.addr(); + const u64 rdata = _rel.data = rel.index_value == 0xFF ? rel.ptr.addr().value() : prx->segs.at(rel.index_value).addr + rel.ptr.addr(); prx->relocs.emplace_back(_rel); switch (rtype) diff --git a/rpcs3/Emu/Cell/PPUTranslator.cpp b/rpcs3/Emu/Cell/PPUTranslator.cpp index 63803e17b8..2b1f42350a 100644 --- a/rpcs3/Emu/Cell/PPUTranslator.cpp +++ b/rpcs3/Emu/Cell/PPUTranslator.cpp @@ -83,7 +83,7 @@ PPUTranslator::PPUTranslator(LLVMContext& context, Module* module, const ppu_mod // Ignore relative relocations, they are handled in emmitted code // Comment out types we haven't confirmed as used and working - // case 10: + case 10: case 11: // case 12: // case 13: