Class CoffRelocationHandler
- java.lang.Object
-
- ghidra.app.util.bin.format.coff.relocation.CoffRelocationHandler
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class CoffRelocationHandler extends java.lang.Object implements ExtensionPoint
An abstract class used to perform COFF relocations. Classes should extend this class to provide relocations in a machine/processor specific way.
-
-
Constructor Summary
Constructors Constructor Description CoffRelocationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
canRelocate(CoffFileHeader fileHeader)
Checks to see whether or not an instance of this COFF relocation hander can handle relocating the COFF defined by the provided file header.abstract void
relocate(Program program, Address address, Symbol symbol, CoffRelocation relocation)
Performs a relocation.
-
-
-
Method Detail
-
canRelocate
public abstract boolean canRelocate(CoffFileHeader fileHeader)
Checks to see whether or not an instance of this COFF relocation hander can handle relocating the COFF defined by the provided file header.- Parameters:
fileHeader
- The file header associated with the COFF to relocate.- Returns:
- True if this relocation handler can do the relocation; otherwise, false.
-
relocate
public abstract void relocate(Program program, Address address, Symbol symbol, CoffRelocation relocation) throws MemoryAccessException, NotFoundException
Performs a relocation.- Parameters:
program
- The program to relocate.address
- The address at which to perform the relocation.symbol
- The symbol used during relocation.relocation
- The relocation information to use to perform the relocation.- Throws:
MemoryAccessException
- If there is a problem accessing memory during the relocation.NotFoundException
- If this handler didn't find a way to perform the relocation.
-
-