Interface CoffRelocationHandler
- All Superinterfaces:
ExtensionPoint
An abstract class used to perform COFF relocations. Classes should extend this class to
provide relocations in a machine/processor specific way.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.relocate
(Address address, CoffRelocation relocation, CoffRelocationContext relocationContext) Performs a relocation at the specified address.
-
Method Details
-
canRelocate
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
RelocationResult relocate(Address address, CoffRelocation relocation, CoffRelocationContext relocationContext) throws MemoryAccessException, RelocationException Performs a relocation at the specified address.- Parameters:
address
- The address at which to perform the relocation.relocation
- The relocation information to use to perform the relocation.relocationContext
- relocation context data- Returns:
- applied relocation result (conveys status and applied byte-length)
- Throws:
MemoryAccessException
- If there is a problem accessing memory during the relocation.RelocationException
- if supported relocation encountered an error during processing. This exception should be thrown in place of returningRelocationResult.FAILURE
or a status ofRelocation.Status.FAILURE
which will facilitate a failure reason viaThrowable.getMessage()
.
-