mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-1036 EXTERNAL Block Offset-Reference refactor
This commit is contained in:
parent
332480a422
commit
2bced1cd43
43 changed files with 461 additions and 216 deletions
|
@ -91,15 +91,16 @@ public class ARM_ElfRelocationHandler extends ElfRelocationHandler {
|
|||
if (elfRelocationContext.extractAddend()) {
|
||||
addend = memory.getInt(relocationAddress);
|
||||
}
|
||||
if (addend != 0 && isUnsupportedExternalRelocation(program, relocationAddress,
|
||||
symbolAddr, symbolName, addend, elfRelocationContext.getLog())) {
|
||||
addend = 0; // prefer bad fixup for EXTERNAL over really-bad fixup
|
||||
}
|
||||
newValue = (int) (symbolValue + addend);
|
||||
if (isThumb) {
|
||||
newValue |= 1;
|
||||
}
|
||||
memory.setInt(relocationAddress, newValue);
|
||||
if (addend != 0) {
|
||||
warnExternalOffsetRelocation(program, relocationAddress,
|
||||
symbolAddr, symbolName, addend, elfRelocationContext.getLog());
|
||||
applyComponentOffsetPointer(program, relocationAddress, addend);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ARM_ElfRelocationConstants.R_ARM_REL32: { // Target class: Data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue