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, reader, space
-
Constructor Summary
ModifierConstructorDescriptionprotected
MachoPrelinkProgramBuilder
(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor) Creates a newMachoPrelinkProgramBuilder
based on the given information. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
build()
static void
buildProgram
(Program program, ByteProvider provider, FileBytes fileBytes, MessageLog log, TaskMonitor monitor) Builds up a PRELINK Mach-OProgram
.protected void
markupChainedFixups
(MachHeader header, List<Address> fixups) Markup the givenList
of chained fixups by creating pointers at their locations, if possibleprotected void
Methods inherited from class ghidra.app.util.opinion.MachoProgramBuilder
createNamespace, 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 newMachoPrelinkProgramBuilder
based on the given information.- Parameters:
program
- TheProgram
to build up.provider
- TheByteProvider
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-OProgram
.- Parameters:
program
- TheProgram
to build up.provider
- TheByteProvider
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
- Overrides:
build
in classMachoProgramBuilder
- Throws:
Exception
-
renameObjMsgSendRtpSymbol
- Overrides:
renameObjMsgSendRtpSymbol
in classMachoProgramBuilder
- Throws:
DuplicateNameException
InvalidInputException
-
markupChainedFixups
protected void markupChainedFixups(MachHeader header, List<Address> fixups) throws CancelledException Description copied from class:MachoProgramBuilder
Markup the givenList
of chained fixups by creating pointers at their locations, if possible- Overrides:
markupChainedFixups
in classMachoProgramBuilder
- Parameters:
header
- The Mach-O headerfixups
- TheList
of chained fixups to markup- Throws:
CancelledException
- if the operation was cancelled
-