diff --git a/tools/psp-prxgen.c b/tools/psp-prxgen.c index 087ffb89..80d68910 100644 --- a/tools/psp-prxgen.c +++ b/tools/psp-prxgen.c @@ -419,7 +419,8 @@ int remove_weak_relocs(struct ElfSection *pReloc, struct ElfSection *pSymbol, st } } - if(LH(pSymData[iSymbol].st_shndx) == 0) + /* Remove PC16 relocations (unsupported by PSP, and useless) */ + if(LH(pSymData[iSymbol].st_shndx) == 0 || ELF32_R_TYPE(LW(pInRel->r_info)) == R_MIPS_PC16) { if(g_verbose) {