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
fileBytes, HEADER_SYMBOL, listing, log, machoHeader, memory, monitor, program, provider, reader, space -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMachoPrelinkProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor) Creates a newMachoPrelinkProgramBuilderbased on the given information. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuild()static voidbuildProgram(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor) Builds up a PRELINK Mach-OProgram.protected voidmarkupChainedFixups(MachHeader header, List<Address> fixups) Markup the givenListof chained fixups by creating pointers at their locations, if possibleprotected voidMethods 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
-
Constructor Details
-
MachoPrelinkProgramBuilder
protected MachoPrelinkProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, 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.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-OProgram.- Parameters:
program- TheProgramto build up.provider- TheByteProviderthat 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
- Overrides:
buildin classMachoProgramBuilder- Throws:
Exception
-
renameObjMsgSendRtpSymbol
- Overrides:
renameObjMsgSendRtpSymbolin classMachoProgramBuilder- Throws:
DuplicateNameExceptionInvalidInputException
-
markupChainedFixups
protected void markupChainedFixups(MachHeader header, List<Address> fixups) throws CancelledException Description copied from class:MachoProgramBuilderMarkup the givenListof chained fixups by creating pointers at their locations, if possible- Overrides:
markupChainedFixupsin classMachoProgramBuilder- Parameters:
header- The Mach-O headerfixups- TheListof chained fixups to markup- Throws:
CancelledException- if the operation was cancelled
-