Package ghidra.app.util.opinion

# Class MachoPrelinkProgramBuilder

java.lang.Object
ghidra.app.util.opinion.MachoProgramBuilder
ghidra.app.util.opinion.MachoPrelinkProgramBuilder

public class MachoPrelinkProgramBuilder extends MachoProgramBuilder
Builds up a PRELINK Mach-O `Program` by parsing the Mach-O headers.

- ## Field Summary

  ### Fields inherited from class ghidra.app.util.opinion.MachoProgramBuilder

  `fileBytes, HEADER_SYMBOL, listing, log, machoHeader, memory, monitor, program, provider, reader, space`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `MachoPrelinkProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor)`
  Creates a new `MachoPrelinkProgramBuilder` based on the given information.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `build()`
  `static void`
  `buildProgram(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor)`
  Builds up a PRELINK Mach-O `Program`.
  `protected void`
  `markupChainedFixups(MachHeader header, List<Address> fixups)`
  Markup the given `List` of chained fixups by creating pointers at their locations, if possible
  `protected void`
  `renameObjMsgSendRtpSymbol()`

  ### Methods inherited from class ghidra.app.util.opinion.MachoProgramBuilder

  `createNamespace, createOneByteFunction, fixupExternalLibrary, fixupProgramTree, getMachoBaseAddress, markupAndSetGolangInitialProgramProperties, markupHeaders, markupLoadCommandData, markupProgramVars, markupSections, processAbsoluteSymbols, processChainedFixups, processCorruptLoadCommands, processDyldInfo, processEncryption, processEntryPoint, processExports, processExternalRelocations, processLibraries, processLocalRelocations, processMemoryBlocks, processNewExport, processSectionRelocations, processStubs, processSymbolTables, processUndefinedSymbols, processUnsupportedLoadCommands, setCompiler, setProgramDescription, setProgramImageBase, setRelocatableProperty, setupHeaderAddr`

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

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

- ## Constructor Details

  - ### MachoPrelinkProgramBuilder

    protected MachoPrelinkProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor) throws Exception
    Creates a new `MachoPrelinkProgramBuilder` based on the given information.
    Parameters:
      `program` - The `Program` to build up.
      `provider` - The `ByteProvider` that contains the Mach-O's bytes.
      `fileBytes` - Where the Mach-O's bytes came from.
      `log` - The log.
      `monitor` - A cancelable task monitor.
    Throws:
      `Exception` - if a problem occurs.

- ## Method Details

  - ### buildProgram

    public static void buildProgram(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor) throws Exception
    Builds up a PRELINK Mach-O `Program`.
    Parameters:
      `program` - The `Program` to build up.
      `provider` - The `ByteProvider` that contains the Mach-O's bytes.
      `fileBytes` - Where the Mach-O's bytes came from.
      `log` - The log.
      `monitor` - A cancelable task monitor.
    Throws:
      `Exception` - if a problem occurs.

  - ### build

    protected void build() throws Exception
    Overrides:
      `build` in class `MachoProgramBuilder`
    Throws:
      `Exception`

  - ### renameObjMsgSendRtpSymbol

    protected void renameObjMsgSendRtpSymbol() throws DuplicateNameException, InvalidInputException
    Overrides:
      `renameObjMsgSendRtpSymbol` in class `MachoProgramBuilder`
    Throws:
      `DuplicateNameException`
      `InvalidInputException`

  - ### markupChainedFixups

    protected void markupChainedFixups(MachHeader header, List<Address> fixups) throws CancelledException
    Description copied from class: `MachoProgramBuilder`
    Markup the given `List` of chained fixups by creating pointers at their locations, if possible
    Overrides:
      `markupChainedFixups` in class `MachoProgramBuilder`
    Parameters:
      `header` - The Mach-O header
      `fixups` - The `List` of chained fixups to markup
    Throws:
      `CancelledException` - if the operation was cancelled