Class DyldChainedFixups
java.lang.Object
ghidra.app.util.bin.format.macho.commands.chained.DyldChainedFixups
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.
-
Field Details
-
RELOCATION_TYPE
public static final int RELOCATION_TYPE- See Also:
-
-
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 aListofDyldFixups that will need to be applied to the image- Parameters:
reader- ABinaryReaderthat 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
ListofDyldFixups - 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 CancelledException Fixes up the program's chained pointers -
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- ABinaryReaderthat 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
-