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

# Class DyldChainedFixups

java.lang.Object
ghidra.app.util.bin.format.macho.commands.chained.DyldChainedFixups

public class DyldChainedFixups extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DyldChainedFixups(Program program, MachHeader header, List<String> libraryPaths, MessageLog log, TaskMonitor monitor)`
  Creates a new `DyldChainedFixups`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Address>`
  `processChainedFixups()`
  Fixes up any chained fixups.
  `void`
  `processPointerChain(DyldChainedImports chainedImports, List<Address> unchainedLocList, DyldChainedPtr.DyldChainType pointerFormat, long page, long nextOff, long auth_value_add)`
  Fixes up any chained pointers, starting at the given address.

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

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

- ## Constructor Details

  - ### DyldChainedFixups

    public DyldChainedFixups(Program program, MachHeader header, List<String> libraryPaths, MessageLog log, TaskMonitor monitor)
    Creates a new `DyldChainedFixups`
    Parameters:
      `program` - The `Program`
      `header` - The Mach-O header
      `libraryPaths` - A `List` of the library paths
      `log` - The log
      `monitor` - A cancelable task monitor.

- ## Method Details

  - ### processChainedFixups

    public List<Address> processChainedFixups() throws Exception
    Fixes up any chained fixups. Relies on the __thread_starts section being present.
    Returns:
      A list of addresses where chained fixups were performed.
    Throws:
      `Exception` - if there was a problem reading/writing memory.

  - ### processPointerChain

    public void processPointerChain(DyldChainedImports chainedImports, List<Address> unchainedLocList, DyldChainedPtr.DyldChainType pointerFormat, long page, long nextOff, long auth_value_add) throws MemoryAccessException, CancelledException
    Fixes up any chained pointers, starting at the given address.
    Parameters:
      `chainedImports` - chained imports (could be null)
      `unchainedLocList` - list of locations that were unchained
      `pointerFormat` - format of pointers within this chain
      `page` - within data pages that has pointers to be unchained
      `nextOff` - offset within the page that is the chain start
      `auth_value_add` - value to be added to each chain pointer
    Throws:
      `MemoryAccessException` - IO problem reading file
      `CancelledException` - user cancels