Class LoadCommand

java.lang.Object
ghidra.app.util.bin.format.macho.commands.LoadCommand
All Implemented Interfaces:
StructConverter
Direct Known Subclasses:
BuildVersionCommand, DyldInfoCommand, DynamicLibraryCommand, DynamicLinkerCommand, DynamicSymbolTableCommand, EncryptedInformationCommand, EntryPointCommand, FileSetEntryCommand, FixedVirtualMemoryFileCommand, LinkEditDataCommand, LinkerOptionCommand, ObsoleteCommand, PrebindChecksumCommand, PreboundDynamicLibraryCommand, RoutinesCommand, RunPathCommand, SegmentCommand, SourceVersionCommand, SubClientCommand, SubFrameworkCommand, SubLibraryCommand, SubUmbrellaCommand, SymbolTableCommand, ThreadCommand, TwoLevelHintsCommand, UnsupportedLoadCommand, UuidCommand, VersionMinCommand

public abstract class LoadCommand extends Object implements StructConverter
Represents a load_command structure
See Also:
  • Constructor Details

  • Method Details

    • getStartIndex

      public long getStartIndex()
      Returns the binary start index of this load command
      Returns:
      the binary start index of this load command
    • getCommandType

      public int getCommandType()
      Gets the type of this load command
      Returns:
      The type of this load command
    • getCommandSize

      public int getCommandSize()
      Gets the size of this load command in bytes
      Returns:
      The size of this load command in bytes
    • getCommandName

      public abstract String getCommandName()
      Gets the name of this load command
      Returns:
      The name of this load command
    • markup

      public abstract void markup(MachHeader header, FlatProgramAPI api, Address baseAddress, boolean isBinary, ProgramModule parentModule, TaskMonitor monitor, MessageLog log)
      Marks-up the program with the data structures for this load command
      Parameters:
      header - the mach header
      api - the flat program api
      baseAddress - the base address to apply the mark-up
      isBinary - true if mach-o was loaded as binary
      parentModule - parent module to create fragments
      monitor - the task monitor
      log - the message logS
    • createFragment

      protected final ProgramFragment createFragment(FlatProgramAPI api, Address baseAddress, ProgramModule module) throws Exception
      Throws:
      Exception
    • updateMonitor

      protected final void updateMonitor(TaskMonitor monitor)