Package ghidra.program.model.reloc
Interface RelocationHandler
-
- All Superinterfaces:
ExtensionPoint
public interface RelocationHandler extends ExtensionPoint
NOTE: ALL RelocationHandler CLASSES MUST END IN "RelocationHandler". If not, the ClassSearcher will not find them.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canRelocate(Program program)
Returns true if this relocation handler can relocate the given program.void
performRelocation(Program program, Relocation relocation, TaskMonitor monitor)
void
relocate(Program program, Address newImageBase, TaskMonitor monitor)
void
relocate(Program program, MemoryBlock block, Address newStartAddress, TaskMonitor monitor)
Relocates the memory block to the new start address.
-
-
-
Method Detail
-
canRelocate
boolean canRelocate(Program program)
Returns true if this relocation handler can relocate the given program. For example, an ELF program requires an ELF-specific relocation handler.- Parameters:
program
- the program to relocation- Returns:
- true if this relocation handler can relocate the given program
-
relocate
void relocate(Program program, Address newImageBase, TaskMonitor monitor) throws MemoryAccessException
- Parameters:
program
-newImageBase
-monitor
-- Throws:
MemoryAccessException
-
relocate
void relocate(Program program, MemoryBlock block, Address newStartAddress, TaskMonitor monitor) throws MemoryAccessException
Relocates the memory block to the new start address. All relocations in the memory block will be fixed-up.- Parameters:
program
-block
-newStartAddress
-monitor
-- Throws:
MemoryAccessException
-
performRelocation
void performRelocation(Program program, Relocation relocation, TaskMonitor monitor) throws MemoryAccessException
- Throws:
MemoryAccessException
-
-