Package ghidra.app.util.opinion
Class DyldCacheProgramBuilder
- java.lang.Object
-
- ghidra.app.util.opinion.MachoProgramBuilder
-
- ghidra.app.util.opinion.DyldCacheProgramBuilder
-
public class DyldCacheProgramBuilder extends MachoProgramBuilder
Builds up a DYLD CacheProgram
by parsing the DYLD Cache headers.
-
-
Field Summary
-
Fields inherited from class ghidra.app.util.opinion.MachoProgramBuilder
BLOCK_SOURCE_NAME, fileBytes, listing, log, machoHeader, memory, monitor, program, provider, space
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DyldCacheProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, boolean shouldProcessSymbols, boolean shouldCreateDylibSections, boolean shouldAddRelocationEntries, boolean shouldCombineSplitFiles, MessageLog log, TaskMonitor monitor)
Creates a newDyldCacheProgramBuilder
based on the given information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
build()
static void
buildProgram(Program program, ByteProvider provider, FileBytes fileBytes, boolean shouldProcessSymbols, boolean shouldCreateDylibSections, boolean addRelocationEntries, boolean shouldCombineSplitFiles, MessageLog log, TaskMonitor monitor)
Builds up a DYLD CacheProgram
.-
Methods inherited from class ghidra.app.util.opinion.MachoProgramBuilder
buildProgram, doRelocations, loadExternalRelocations, loadLocalRelocations, loadSectionRelocations, markupHeaders, markupSections, processDyldInfo, processMemoryBlocks, processProgramVars, renameObjMsgSendRtpSymbol, setupHeaderAddr
-
-
-
-
Constructor Detail
-
DyldCacheProgramBuilder
protected DyldCacheProgramBuilder(Program program, ByteProvider provider, FileBytes fileBytes, boolean shouldProcessSymbols, boolean shouldCreateDylibSections, boolean shouldAddRelocationEntries, boolean shouldCombineSplitFiles, MessageLog log, TaskMonitor monitor)
Creates a newDyldCacheProgramBuilder
based on the given information.- Parameters:
program
- TheProgram
to build upprovider
- TheByteProvider
that contains the DYLD Cache bytesfileBytes
- Where the DYLD Cache's bytes came fromshouldProcessSymbols
- True if symbols should be processed; otherwise, falseshouldCreateDylibSections
- True if memory blocks should be created for DYLIB sections; otherwise, falseshouldAddRelocationEntries
- True to create a relocation entry for each fixed up pointer in pointer chainshouldCombineSplitFiles
- True if split DYLD Cache files should be automatically imported and combined into 1 program; otherwise, falselog
- The logmonitor
- A cancelable task monitor
-
-
Method Detail
-
buildProgram
public static void buildProgram(Program program, ByteProvider provider, FileBytes fileBytes, boolean shouldProcessSymbols, boolean shouldCreateDylibSections, boolean addRelocationEntries, boolean shouldCombineSplitFiles, MessageLog log, TaskMonitor monitor) throws java.lang.Exception
Builds up a DYLD CacheProgram
.- Parameters:
program
- TheProgram
to build upprovider
- TheByteProvider
that contains the DYLD Cache's bytesfileBytes
- Where the Mach-O's bytes came fromshouldProcessSymbols
- True if symbols should be processed; otherwise, falseshouldCreateDylibSections
- True if memory blocks should be created for DYLIB sections; otherwise, falseaddRelocationEntries
- True to create a relocation entry for each fixed up pointer in pointer chain; otherwise, falseshouldCombineSplitFiles
- True if split DYLD Cache files should be automatically imported and combined into 1 program; otherwise, falselog
- The logmonitor
- A cancelable task monitor- Throws:
java.lang.Exception
- if a problem occurs
-
build
protected void build() throws java.lang.Exception
- Overrides:
build
in classMachoProgramBuilder
- Throws:
java.lang.Exception
-
-