Merge remote-tracking branch 'origin/GP-5918_ELF_MIPS64_RelocationFix' into patch

This commit is contained in:
ghidra1 2025-08-11 17:51:36 -04:00
commit cf61a2ffaf

View file

@ -357,8 +357,14 @@ public class MIPS_ElfRelocationHandler
}
value = symbolValue;
if (elfRelocationContext.extractAddend()) {
// extract addend based upon pointer size
addend = memory.getInt(relocationAddress);
// Extract addend based upon pointer size when saving 64-bit addend
// for packed relocation type
if (saveValue && program.getDefaultPointerSize() == 8) {
addend = memory.getLong(relocationAddress);
}
else {
addend = memory.getInt(relocationAddress);
}
}
newValue = value + addend;