diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/MemoryByteProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/MemoryByteProvider.java index 1f38a3109a..d361c5c422 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/MemoryByteProvider.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/MemoryByteProvider.java @@ -159,6 +159,10 @@ public class MemoryByteProvider implements ByteProvider { this.isEmtpy = maxAddress == null; } + public Memory getMemory() { + return memory; + } + private Address getAddress(long index) throws IOException { if (index == 0) { return baseAddress; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFProgram.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFProgram.java index dc980409b4..cf118b007c 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFProgram.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFProgram.java @@ -573,7 +573,10 @@ public class DWARFProgram implements Closeable { } ByteProvider bp = br.getByteProvider(); if (bp instanceof MemoryByteProvider mbp && !mbp.isEmpty()) { - if (program.getRelocationTable().getRelocations(mbp.getAddressSet()).hasNext()) { + Program providerProgram = mbp.getMemory().getProgram(); + if (providerProgram.getRelocationTable() + .getRelocations(mbp.getAddressSet()) + .hasNext()) { return true; } }