tools/psyq-obj-parser: Fix GPREL16 behavior

`GPREL16` should behave identically to `GPREL16_LE`; it was
previously blanking the relocation out entirely.

This likely wasn't caught because according to testing, most
versions of `aspsx` (2.67 and earlier) produce `GPREL16_LE`
rather than `GPREL16`. It was only in 2.77 that `aspsx` switched
to `GPREL16` for some reloc exprs.
This commit is contained in:
Abel Briggs
2026-10-11 10:01:37 -07:00
parent 29d7b60913
commit 919c597633
+1 -5
View File
@@ -1295,11 +1295,7 @@ bool PsyqLnkFile::Relocation::generateElf(ElfRelocationPass pass, const std::str
sectionData[offset + 1] = (uint8_t)(lo >> 8);
break;
}
case PsyqRelocType::GPREL16: {
sectionData[offset + 0] = 0;
sectionData[offset + 1] = 0;
break;
}
case PsyqRelocType::GPREL16:
case PsyqRelocType::GPREL16_LE: {
uint16_t lo = symbolOffset & 0xFFFF;
sectionData[offset + 0] = (uint8_t)(lo >> 0);