Ghidra is a software reverse engineering (SRE) framework
GP-1052 corrected ELF memory section resolver handling of overlay memory addresses
ghidra1102ff918ebe2
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MemorySectionResolver.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MemorySectionResolver.javaindex b030036e87..ee29c354fb 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MemorySectionResolver.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MemorySectionResolver.java@@ -607,12 +607,13 @@ public abstract class MemorySectionResolver {conflictGapEnd = expectedRangeStart.previous();}+ // Perform address computation in physical spaceAddress rangeStartAddr =- fileRange.rangeStartAddress.add(filePos - fileRange.rangeStartFileOffset);+ fileRange.rangeStartAddress.getPhysicalAddress()+ .add(filePos - fileRange.rangeStartFileOffset);// Ignore use of overlay and compare physical address for match to avoid duplication- if (!expectedRangeStart.getPhysicalAddress().equals(- rangeStartAddr.getPhysicalAddress())) {+ if (!expectedRangeStart.getPhysicalAddress().equals(rangeStartAddr)) {// File load memory range does not correspond to target memory rangeif (conflictGapStart == null) {conflictGapStart = expectedRangeStart;