psp-prxgen: remove PC16 relocations

It apparently appeared with binutils 2.18+.
It appears when compiling an assembly file containing a branch to a
global name, but looks useless (branches are relative to current
position, and I do not see how the symbol could "move").
This relocation made the PSP not load the modules using it.
This commit is contained in:
Arthur Blot
2014-07-21 12:01:23 +02:00
parent bfd46c92d2
commit 80930eca55

View File

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