Class DyldChainedFixups
java.lang.Object
ghidra.app.util.bin.format.macho.commands.chained.DyldChainedFixups
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfixupChainedPointers
(List<DyldFixup> fixups, Program program, Address imagebase, List<String> libraryPaths, MessageLog log, TaskMonitor monitor) Fixes up the program's chained pointersgetChainedFixups
(BinaryReader reader, DyldChainedImports chainedImports, DyldChainedPtr.DyldChainType pointerFormat, long page, long nextOff, long auth_value_add, long imagebase, SymbolTable symbolTable, MessageLog log, TaskMonitor monitor) processPointerChain
(BinaryReader reader, long chainStart, long nextOffSize, long imagebase, MessageLog log, TaskMonitor monitor) Fixes up any chained pointers, starting at the given address.
-
Constructor Details
-
DyldChainedFixups
public DyldChainedFixups()
-
-
Method Details
-
getChainedFixups
public static List<DyldFixup> getChainedFixups(BinaryReader reader, DyldChainedImports chainedImports, DyldChainedPtr.DyldChainType pointerFormat, long page, long nextOff, long auth_value_add, long imagebase, SymbolTable symbolTable, MessageLog log, TaskMonitor monitor) throws IOException, CancelledException Walks the chained fixup information and collects aList
ofDyldFixup
s that will need to be applied to the image- Parameters:
reader
- ABinaryReader
that can read the imagechainedImports
- chained imports (could be null)pointerFormat
- format of pointers within this chainpage
- within data pages that has pointers to be unchainednextOff
- offset within the page that is the chain startauth_value_add
- value to be added to each chain pointerimagebase
- The image basesymbolTable
- TheSymbolTable
, or null if not availablelog
- The logmonitor
- A cancellable monitor- Returns:
- A
List
ofDyldFixup
s - Throws:
IOException
- If there was an IO-related issueCancelledException
- If the user cancelled the operation
-
fixupChainedPointers
public static List<Address> fixupChainedPointers(List<DyldFixup> fixups, Program program, Address imagebase, List<String> libraryPaths, MessageLog log, TaskMonitor monitor) throws MemoryAccessException, CancelledException Fixes up the program's chained pointers- Parameters:
fixups
- AList
of the fixupsprogram
- TheProgram
imagebase
- The image baselibraryPaths
- AList
of library pathslog
- The logmonitor
- A cancellable monitor- Returns:
- A
List
of fixed upAddress
's - Throws:
MemoryAccessException
- If there was a problem accessing memoryCancelledException
- If the user cancelled the operation
-
processPointerChain
public static List<DyldFixup> processPointerChain(BinaryReader reader, long chainStart, long nextOffSize, long imagebase, MessageLog log, TaskMonitor monitor) throws IOException, CancelledException Fixes up any chained pointers, starting at the given address.- Parameters:
reader
- ABinaryReader
that can read the imagechainStart
- The starting of address of the pointer chain to fix.nextOffSize
- The size of the next offset.imagebase
- The image baselog
- The logmonitor
- A cancellable monitor- Returns:
- A list of addresses where pointer fixes were performed.
- Throws:
IOException
- If there was an IO-related issueCancelledException
- If the user cancelled the operation
-