Skip to content

Commit 15234df

Browse files
committed
Revert GP-1575_emteere_FDErecordFix
1 parent 2478f09 commit 15234df

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

Ghidra/Features/Base/src/main/java/ghidra/app/plugin/exceptionhandlers/gcc/AbstractDwarfEHDecoder.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,7 @@ private long resolveRelativeOffset(long val, DwarfDecodeContext context)
333333

334334
switch (appMode) {
335335
case DW_EH_PE_absptr:
336-
// if the program has been re-based, need to add in the image base difference.
337-
// but only if there are no relocations at this location
338-
if (prog.getRelocationTable().getRelocation(addr) == null) {
339-
long programBaseAddressFixup = context.getOriginalImageBaseOffset();
340-
341-
val = val + programBaseAddressFixup;
342-
}
336+
// just pass this through
343337
break;
344338

345339
case DW_EH_PE_aligned:

Ghidra/Features/Base/src/main/java/ghidra/app/plugin/exceptionhandlers/gcc/DwarfDecodeContext.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package ghidra.app.plugin.exceptionhandlers.gcc;
1717

18-
import ghidra.app.util.opinion.ElfLoader;
1918
import ghidra.program.model.address.Address;
2019
import ghidra.program.model.listing.Function;
2120
import ghidra.program.model.listing.Program;
@@ -35,7 +34,6 @@ public class DwarfDecodeContext {
3534
private Object decodedValue;
3635
private int encodedLength;
3736
private MemBuffer buffer;
38-
private long originalImageBaseOffset; // offset from image base used in original dwarf, and the actual load image base
3937

4038
/**
4139
* Constructs a Dwarf decode context.
@@ -98,8 +96,6 @@ public DwarfDecodeContext(Program program, Address readAddr, MemoryBlock ehBlock
9896
this.ehBlock = ehBlock;
9997
this.functionEntryPoint = entryPoint;
10098

101-
Long oib = ElfLoader.getElfOriginalImageBase(program);
102-
this.originalImageBaseOffset = program.getImageBase().getOffset() - oib.longValue();
10399
}
104100

105101
/**
@@ -184,12 +180,4 @@ public MemoryBlock getEhBlock() {
184180
public Address getFunctionEntryPoint() {
185181
return functionEntryPoint;
186182
}
187-
188-
/**
189-
* Gets the offset from the programs image base and the dwarf original image base
190-
* @return offset that if added to the current image base would be the original dwarf image base
191-
*/
192-
public long getOriginalImageBaseOffset() {
193-
return originalImageBaseOffset;
194-
}
195183
}

0 commit comments

Comments
 (0)