Package ghidra.app.util.opinion
Class MachoPrelinkProgramBuilder
java.lang.Object
ghidra.app.util.opinion.MachoProgramBuilder
ghidra.app.util.opinion.MachoPrelinkProgramBuilder
Builds up a PRELINK Mach-O
Program by parsing the Mach-O headers.-
Field Summary
Fields inherited from class ghidra.app.util.opinion.MachoProgramBuilder
BLOCK_SOURCE_NAME, fileBytes, listing, log, machoHeader, memory, monitor, program, provider, shouldAddChainedFixupsRelocations, space -
Constructor Summary
ConstructorsChangeModifierConstructorDescriptionprotectedMachoPrelinkProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, boolean shouldAddChainedFixupsRelocations, MessageLog log, TaskMonitor monitor) Creates a newMachoPrelinkProgramBuilderbased on the given information. -
Method Summary
ChangeModifier and TypeMethodDescriptionprotected voidbuild()NEWstatic voidbuildProgram(Program program, ByteProvider provider, FileBytes fileBytes, boolean addChainedFixupsRelocations, MessageLog log, TaskMonitor monitor) Builds up a PRELINK Mach-OProgram.protected voidmarkupChainedFixups(List<Address> fixups) Markup the givenListof chained fixups by creating pointers at their locations, if possibleprotected voidREMOVEDvoidRemovedREMOVEDvoidRemovedREMOVEDvoidRemovedMethods inherited from class ghidra.app.util.opinion.MachoProgramBuilder
fixupProgramTree, markupHeaders, markupSections, processAbsoluteSymbols, processChainedFixups, processDyldInfo, processEncryption, processEntryPoint, processExports, processExternalRelocations, processIndirectSymbols, processLibraries, processLocalRelocations, processMemoryBlocks, processProgramDescription, processProgramVars, processSectionRelocations, processSymbolTables, processUndefinedSymbols, processUnsupportedLoadCommands, setImageBase, setRelocatableProperty, setupHeaderAddr
-
Constructor Details
-
MachoPrelinkProgramBuilder
protected MachoPrelinkProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, boolean shouldAddChainedFixupsRelocations, MessageLog log, TaskMonitor monitor) throws Exception Creates a newMachoPrelinkProgramBuilderbased on the given information.- Parameters:
program- TheProgramto build up.provider- TheByteProviderthat contains the Mach-O's bytes.fileBytes- Where the Mach-O's bytes came from.shouldAddChainedFixupsRelocations- True if relocations should be added for chained fixups; otherwise, false.log- The log.monitor- A cancelable task monitor.- Throws:
Exception- if a problem occurs.
-
-
Method Details
-
buildProgram NEW
public static void buildProgram(Program program, ByteProvider provider, FileBytes fileBytes, boolean addChainedFixupsRelocations, MessageLog log, TaskMonitor monitor) throws Exception Builds up a PRELINK Mach-OProgram.- Parameters:
program- TheProgramto build up.provider- TheByteProviderthat contains the Mach-O's bytes.fileBytes- Where the Mach-O's bytes came from.addChainedFixupsRelocations- True if relocations should be added for chained fixups; otherwise, false.log- The log.monitor- A cancelable task monitor.- Throws:
Exception- if a problem occurs.
-
build
- Overrides:
buildin classMachoProgramBuilder- Throws:
Exception
-
renameObjMsgSendRtpSymbol
- Overrides:
renameObjMsgSendRtpSymbolin classMachoProgramBuilder- Throws:
DuplicateNameExceptionInvalidInputException
-
markupChainedFixups
Description copied from class:MachoProgramBuilderMarkup the givenListof chained fixups by creating pointers at their locations, if possible- Overrides:
markupChainedFixupsin classMachoProgramBuilder- Parameters:
fixups- TheListof chained fixups to markup- Throws:
CancelledException- if the operation was cancelled
-