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
Represents a load_command structure
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ProgramFragment
createFragment
(FlatProgramAPI api, Address baseAddress, ProgramModule module) abstract String
Gets the name of this load commandint
Gets the size of this load command in bytesint
Gets the type of this load commandlong
Returns the binary start index of this load commandabstract 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 commandprotected final void
updateMonitor
(TaskMonitor monitor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.app.util.bin.StructConverter
toDataType
-
Constructor Details
-
LoadCommand
Creates a newLoadCommand
- Parameters:
reader
- ABinaryReader
that points to the start of the load command- Throws:
IOException
- if there was an IO-related error
-
-
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
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 headerapi
- the flat program apibaseAddress
- the base address to apply the mark-upisBinary
- true if mach-o was loaded as binaryparentModule
- parent module to create fragmentsmonitor
- the task monitorlog
- the message logS
-
createFragment
protected final ProgramFragment createFragment(FlatProgramAPI api, Address baseAddress, ProgramModule module) throws Exception - Throws:
Exception
-
updateMonitor
-