diff --git a/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java b/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java index a37aba9..f0c4f3f 100644 --- a/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java +++ b/src/main/java/vitaloaderredux/analyzer/NIDAnalyzer.java @@ -221,9 +221,7 @@ public boolean accept(File pathname, GhidraFileChooserModel model) { fileChooser.setFileFilter(yamlFilter); fileChooser.setTitle("Choose the NID database file to use for this analysis"); fileChooser.setApproveButtonText("Use selected file"); - fileChooser.setApproveButtonToolTipText( - "Use the selected file as the NID database file for this analysis"); - // fileChooser.rescanCurrentDirectory(); + fileChooser.setApproveButtonToolTipText("Use the selected file as the NID database file for this analysis"); databaseFile = fileChooser.getSelectedFile(); break; } diff --git a/src/main/java/vitaloaderredux/arm_relocation/ArmRelocator.java b/src/main/java/vitaloaderredux/arm_relocation/ArmRelocator.java index 2cad10b..89e18f6 100644 --- a/src/main/java/vitaloaderredux/arm_relocation/ArmRelocator.java +++ b/src/main/java/vitaloaderredux/arm_relocation/ArmRelocator.java @@ -7,14 +7,12 @@ import ghidra.program.model.mem.MemoryAccessException; import ghidra.program.model.mem.MemoryBlock; import vitaloaderredux.elf.MalformedElfException; - import vitaloaderredux.loader.ArmElfPrxLoaderContext; - import vitaloaderredux.misc.BitfieldReader; import vitaloaderredux.misc.Datatypes; -import vitaloaderredux.misc.Utils; import vitaloaderredux.misc.ImportExportProperty.IEKind; import vitaloaderredux.misc.ImportExportProperty.IEType; +import vitaloaderredux.misc.Utils; public class ArmRelocator { diff --git a/src/main/java/vitaloaderredux/elf/ElfEhdr.java b/src/main/java/vitaloaderredux/elf/ElfEhdr.java index 6b42e52..a0c1a55 100644 --- a/src/main/java/vitaloaderredux/elf/ElfEhdr.java +++ b/src/main/java/vitaloaderredux/elf/ElfEhdr.java @@ -6,10 +6,6 @@ import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.ByteProvider; import ghidra.app.util.bin.StructConverter; -import ghidra.util.DataConverter; -import ghidra.util.LittleEndianDataConverter; -import ghidra.util.exception.DuplicateNameException; -import vitaloaderredux.misc.Datatypes; import ghidra.app.util.bin.format.Writeable; import ghidra.app.util.bin.format.elf.ElfConstants; import ghidra.app.util.bin.format.elf.ElfProgramHeaderConstants; @@ -21,6 +17,10 @@ import ghidra.program.model.data.StructureDataType; import ghidra.program.model.data.UnsignedIntegerDataType; import ghidra.program.model.data.UnsignedShortDataType; +import ghidra.util.DataConverter; +import ghidra.util.LittleEndianDataConverter; +import ghidra.util.exception.DuplicateNameException; +import vitaloaderredux.misc.Datatypes; public class ElfEhdr implements StructConverter, Writeable { diff --git a/src/main/java/vitaloaderredux/elf/ElfPhdr.java b/src/main/java/vitaloaderredux/elf/ElfPhdr.java index 802fa50..3975ba0 100644 --- a/src/main/java/vitaloaderredux/elf/ElfPhdr.java +++ b/src/main/java/vitaloaderredux/elf/ElfPhdr.java @@ -3,12 +3,12 @@ import java.io.IOException; import ghidra.app.util.bin.BinaryReader; +import ghidra.app.util.bin.format.elf.ElfProgramHeaderConstants; import ghidra.program.model.data.DataType; import ghidra.program.model.data.EnumDataType; import ghidra.program.model.data.StructureDataType; import ghidra.program.model.data.UnsignedIntegerDataType; import vitaloaderredux.misc.Datatypes; -import ghidra.app.util.bin.format.elf.ElfProgramHeaderConstants; public class ElfPhdr { //TODO: verify only those exist diff --git a/src/main/java/vitaloaderredux/elf/ElfShdr.java b/src/main/java/vitaloaderredux/elf/ElfShdr.java index 86223af..c1cb040 100644 --- a/src/main/java/vitaloaderredux/elf/ElfShdr.java +++ b/src/main/java/vitaloaderredux/elf/ElfShdr.java @@ -10,7 +10,6 @@ import ghidra.program.model.data.EnumDataType; import ghidra.program.model.data.StructureDataType; import ghidra.program.model.data.UnsignedIntegerDataType; - import vitaloaderredux.misc.Datatypes; public class ElfShdr { diff --git a/src/main/java/vitaloaderredux/loader/ArmElfPrxLoader.java b/src/main/java/vitaloaderredux/loader/ArmElfPrxLoader.java index 7b185f1..240f40b 100644 --- a/src/main/java/vitaloaderredux/loader/ArmElfPrxLoader.java +++ b/src/main/java/vitaloaderredux/loader/ArmElfPrxLoader.java @@ -2,7 +2,9 @@ import java.io.IOException; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import ghidra.app.util.MemoryBlockUtils; import ghidra.app.util.Option; @@ -26,7 +28,6 @@ import ghidra.program.model.address.AddressSpace; import ghidra.program.model.data.ByteDataType; import ghidra.program.model.data.DataType; - import ghidra.program.model.lang.LanguageCompilerSpecPair; import ghidra.program.model.listing.CodeUnit; import ghidra.program.model.listing.Data; @@ -39,14 +40,12 @@ import ghidra.util.exception.CancelledException; import ghidra.util.exception.DuplicateNameException; import ghidra.util.task.TaskMonitor; - import vitaloaderredux.elf.ElfEhdr; import vitaloaderredux.elf.ElfEhdr.ModInfoLocation; import vitaloaderredux.elf.ElfPhdr; import vitaloaderredux.elf.ElfShdr; import vitaloaderredux.elf.MalformedElfException; import vitaloaderredux.elf.UnsupportedElfException; - import vitaloaderredux.misc.Datatypes; import vitaloaderredux.misc.HexOption; import vitaloaderredux.misc.ImportExportProperty; diff --git a/src/main/java/vitaloaderredux/misc/ProgramProcessingHelper.java b/src/main/java/vitaloaderredux/misc/ProgramProcessingHelper.java index 79951cf..5677e54 100644 --- a/src/main/java/vitaloaderredux/misc/ProgramProcessingHelper.java +++ b/src/main/java/vitaloaderredux/misc/ProgramProcessingHelper.java @@ -22,13 +22,13 @@ import ghidra.program.model.listing.ContextChangeException; import ghidra.program.model.listing.Data; import ghidra.program.model.listing.Function; +import ghidra.program.model.listing.Function.FunctionUpdateType; import ghidra.program.model.listing.FunctionManager; import ghidra.program.model.listing.Listing; import ghidra.program.model.listing.ParameterImpl; import ghidra.program.model.listing.Program; import ghidra.program.model.listing.ProgramContext; import ghidra.program.model.listing.Variable; -import ghidra.program.model.listing.Function.FunctionUpdateType; import ghidra.program.model.mem.Memory; import ghidra.program.model.mem.MemoryAccessException; import ghidra.program.model.mem.MemoryBlock; diff --git a/src/main/java/vitaloaderredux/scetypes/ILibent.java b/src/main/java/vitaloaderredux/scetypes/ILibent.java index a96baf1..6f01e34 100644 --- a/src/main/java/vitaloaderredux/scetypes/ILibent.java +++ b/src/main/java/vitaloaderredux/scetypes/ILibent.java @@ -12,12 +12,11 @@ import ghidra.program.model.data.TypedefDataType; import ghidra.program.model.listing.Function; import ghidra.program.model.symbol.Namespace; - import vitaloaderredux.elf.MalformedElfException; import vitaloaderredux.loader.ArmElfPrxLoaderContext; import vitaloaderredux.misc.Datatypes; -import vitaloaderredux.misc.sdt_probedesc_t; import vitaloaderredux.misc.Utils; +import vitaloaderredux.misc.sdt_probedesc_t; public abstract class ILibent { // Library NID returned when it cannot be obtained. diff --git a/src/main/java/vitaloaderredux/scetypes/ILibstub.java b/src/main/java/vitaloaderredux/scetypes/ILibstub.java index b21ac01..237842d 100644 --- a/src/main/java/vitaloaderredux/scetypes/ILibstub.java +++ b/src/main/java/vitaloaderredux/scetypes/ILibstub.java @@ -5,14 +5,13 @@ import ghidra.app.util.bin.BinaryReader; import ghidra.program.model.address.Address; -import ghidra.program.model.symbol.Namespace; import ghidra.program.model.data.DataType; import ghidra.program.model.data.StructureDataType; import ghidra.program.model.data.TerminatedStringDataType; import ghidra.program.model.data.TypedefDataType; import ghidra.program.model.listing.CodeUnit; import ghidra.program.model.listing.Function; - +import ghidra.program.model.symbol.Namespace; import vitaloaderredux.loader.ArmElfPrxLoaderContext; import vitaloaderredux.misc.Datatypes; import vitaloaderredux.misc.Utils; diff --git a/src/main/java/vitaloaderredux/scetypes/libc/LibcAllocReplacement.java b/src/main/java/vitaloaderredux/scetypes/libc/LibcAllocReplacement.java index 469aece..d23f4c5 100644 --- a/src/main/java/vitaloaderredux/scetypes/libc/LibcAllocReplacement.java +++ b/src/main/java/vitaloaderredux/scetypes/libc/LibcAllocReplacement.java @@ -12,7 +12,6 @@ import ghidra.program.model.data.TypedefDataType; import ghidra.program.model.data.VoidDataType; import ghidra.program.model.listing.Function; - import vitaloaderredux.elf.MalformedElfException; import vitaloaderredux.loader.ArmElfPrxLoaderContext; import vitaloaderredux.misc.Datatypes; diff --git a/src/main/java/vitaloaderredux/scetypes/libc/LibcxxAllocReplacement.java b/src/main/java/vitaloaderredux/scetypes/libc/LibcxxAllocReplacement.java index 989a765..b0db250 100644 --- a/src/main/java/vitaloaderredux/scetypes/libc/LibcxxAllocReplacement.java +++ b/src/main/java/vitaloaderredux/scetypes/libc/LibcxxAllocReplacement.java @@ -12,7 +12,6 @@ import ghidra.program.model.data.TypedefDataType; import ghidra.program.model.data.VoidDataType; import ghidra.program.model.listing.Function; - import vitaloaderredux.elf.MalformedElfException; import vitaloaderredux.loader.ArmElfPrxLoaderContext; import vitaloaderredux.misc.Datatypes; diff --git a/src/main/java/vitaloaderredux/scetypes/libc/TlsAllocReplacement.java b/src/main/java/vitaloaderredux/scetypes/libc/TlsAllocReplacement.java index 93c02a9..855e499 100644 --- a/src/main/java/vitaloaderredux/scetypes/libc/TlsAllocReplacement.java +++ b/src/main/java/vitaloaderredux/scetypes/libc/TlsAllocReplacement.java @@ -12,7 +12,6 @@ import ghidra.program.model.data.TypedefDataType; import ghidra.program.model.data.VoidDataType; import ghidra.program.model.listing.Function; - import vitaloaderredux.elf.MalformedElfException; import vitaloaderredux.loader.ArmElfPrxLoaderContext; import vitaloaderredux.misc.Datatypes;