Package ghidra.app.util.bin.format.macho.commands

# Class DyldChainedFixupsCommand

java.lang.Object
ghidra.app.util.bin.format.macho.commands.LoadCommand
ghidra.app.util.bin.format.macho.commands.LinkEditDataCommand
ghidra.app.util.bin.format.macho.commands.DyldChainedFixupsCommand

All Implemented Interfaces:
  `StructConverter`

public class DyldChainedFixupsCommand extends LinkEditDataCommand
Represents a `dyld_chained_fixups_command` structure

See Also:
  - mach-o/fixup-chains.h

- ## Field Summary

  ### Fields inherited from class ghidra.app.util.bin.format.macho.commands.LinkEditDataCommand

  `dataoff, dataReader, datasize`

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<DyldFixup>`
  `getChainedFixups(BinaryReader reader, long imagebase, SymbolTable symbolTable, MessageLog log, TaskMonitor monitor)`
  Walks this command's chained fixup information and collects a `List` of `DyldFixup`s that will need to be applied to the image
  `DyldChainedFixupHeader`
  `getChainHeader()`
  Gets the `DyldChainedFixupHeader`
  `String`
  `getCommandName()`
  Gets the name of this load command
  `void`
  `markup(Program program, MachHeader header, String source, TaskMonitor monitor, MessageLog log)`
  Marks up this `LoadCommand` data with data structures and comments.
  `void`
  `markupRawBinary(MachHeader header, FlatProgramAPI api, Address baseAddress, ProgramModule parentModule, TaskMonitor monitor, MessageLog log)`
  Marks-up this `LoadCommand` with data structures and comments.

  ### Methods inherited from class ghidra.app.util.bin.format.macho.commands.LinkEditDataCommand

  `getLinkerDataOffset, getLinkerDataSize, toDataType`

  ### Methods inherited from class ghidra.app.util.bin.format.macho.commands.LoadCommand

  `checkCount, createFragment, createPlateComment, fileOffsetToAddress, getCommandSize, getCommandType, getContextualName, getStartIndex, markupPlateComment, updateMonitor`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getChainHeader

    public DyldChainedFixupHeader getChainHeader()
    Gets the `DyldChainedFixupHeader`
    Returns:
      The `DyldChainedFixupHeader`

  - ### getCommandName

    public String getCommandName()
    Description copied from class: `LoadCommand`
    Gets the name of this load command
    Overrides:
      `getCommandName` in class `LinkEditDataCommand`
    Returns:
      The name of this load command

  - ### markup

    public void markup(Program program, MachHeader header, String source, TaskMonitor monitor, MessageLog log) throws CancelledException
    Description copied from class: `LoadCommand`
    Marks up this `LoadCommand` data with data structures and comments. Assumes the program was imported as a Mach-O.
    Overrides:
      `markup` in class `LinkEditDataCommand`
    Parameters:
      `program` - The `Program` to mark up
      `header` - The Mach-O header
      `source` - A name that represents where the header came from (could be null)
      `monitor` - A cancellable task monitor
      `log` - The log
    Throws:
      `CancelledException` - if the user cancelled the operation

  - ### markupRawBinary

    public void markupRawBinary(MachHeader header, FlatProgramAPI api, Address baseAddress, ProgramModule parentModule, TaskMonitor monitor, MessageLog log)
    Description copied from class: `LoadCommand`
    Marks-up this `LoadCommand` with data structures and comments. Assumes the program was imported as a Raw Binary.
    Overrides:
      `markupRawBinary` in class `LinkEditDataCommand`
    Parameters:
      `header` - The Mach-O header
      `api` - A `FlatProgramAPI`
      `baseAddress` - The base address of the program
      `parentModule` - The parent `module` to create fragments
      `monitor` - A cancellable task monitor
      `log` - The log
    See Also:
      - `MachoBinaryAnalysisCommand`

  - ### getChainedFixups

    public List<DyldFixup> getChainedFixups(BinaryReader reader, long imagebase, SymbolTable symbolTable, MessageLog log, TaskMonitor monitor) throws IOException, CancelledException
    Walks this command's chained fixup information and collects a `List` of `DyldFixup`s that will need to be applied to the image
    Parameters:
      `reader` - A `BinaryReader` that can read the image
      `imagebase` - The image base
      `symbolTable` - The `SymbolTable`, or null if not available
      `log` - The log
      `monitor` - A cancellable monitor
    Returns:
      A `List` of `DyldFixup`s
    Throws:
      `IOException` - If there was an IO-related issue
      `CancelledException` - If the user cancelled the operation