Skip to content

Commit

Permalink
Make ElfCompatibilityProvider compatible with Ghidra 17 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
TSRBerry authored Dec 24, 2023
1 parent 4b14441 commit ecbe8c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/adubbz/nx/common/ElfCompatibilityProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import adubbz.nx.util.FullMemoryByteProvider;
import adubbz.nx.util.LegacyBinaryReader;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.ByteArrayProvider;
import ghidra.app.util.bin.ByteProvider;
import ghidra.app.util.bin.format.elf.*;
import ghidra.app.util.bin.format.elf.extend.ElfExtensionFactory;
Expand Down Expand Up @@ -352,7 +353,7 @@ public static class DummyElfHeader extends ElfHeader
private HashMap<Integer, ElfDynamicType> dynamicTypeMap;

public DummyElfHeader(boolean isAarch32) throws ElfException {
super(ByteProvider.EMPTY_BYTEPROVIDER, s -> {});
super(new ByteArrayProvider(Arrays.copyOf(ElfConstants.MAGIC_BYTES, ElfConstants.EI_NIDENT + 18)), s -> {});

this.isAarch32 = isAarch32;
dynamicTypeMap = new HashMap<>();
Expand All @@ -365,8 +366,6 @@ public DummyElfHeader(boolean isAarch32) throws ElfException {
}
}

@Override
protected void initElfHeader() { }

@Override
protected HashMap<Integer, ElfDynamicType> getDynamicTypeMap()
Expand Down

0 comments on commit ecbe8c3

Please sign in to comment.