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
,FixedVirtualMemoryFileCommand
,LinkEditDataCommand
,ObsoleteCommand
,PrebindChecksumCommand
,PreboundDynamicLibraryCommand
,RoutinesCommand
,RunPathCommand
,SegmentCommand
,SourceVersionCommand
,SubClientCommand
,SubFrameworkCommand
,SubLibraryCommand
,SubUmbrellaCommand
,SymbolTableCommand
,ThreadCommand
,TwoLevelHintsCommand
,UnsupportedLoadCommand
,UuidCommand
,VersionMinCommand
public abstract class LoadCommand extends java.lang.Object implements StructConverter
Represents a load_command structure.- See Also:
- mach-o/loader.h
-
-
Constructor Summary
Constructors Constructor Description LoadCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ProgramFragment
createFragment(FlatProgramAPI api, Address baseAddress, ProgramModule module)
abstract java.lang.String
getCommandName()
Returns the name of this command.int
getCommandSize()
Total size of command in bytesint
getCommandType()
Type of load commandlong
getStartIndex()
Returns the binary start index of this load command.protected void
initLoadCommand(FactoryBundledWithBinaryReader reader)
abstract void
markup(MachHeader header, FlatProgramAPI api, Address baseAddress, boolean isBinary, ProgramModule parentModule, TaskMonitor monitor, MessageLog log)
Mark-up the program with the data structures for this load command.protected 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
-
-
-
-
Method Detail
-
initLoadCommand
protected void initLoadCommand(FactoryBundledWithBinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
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()
Type of load command- Returns:
- type of load command
-
getCommandSize
public int getCommandSize()
Total size of command in bytes- Returns:
- total size of command in bytes
-
getCommandName
public abstract java.lang.String getCommandName()
Returns the name of this command.- Returns:
- the name of this command
-
markup
public abstract void markup(MachHeader header, FlatProgramAPI api, Address baseAddress, boolean isBinary, ProgramModule parentModule, TaskMonitor monitor, MessageLog log)
Mark-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 java.lang.Exception
- Throws:
java.lang.Exception
-
updateMonitor
protected final void updateMonitor(TaskMonitor monitor)
-
-