Package ghidra.app.util.bin.format.pef
Class Relocation
- java.lang.Object
-
- ghidra.app.util.bin.format.pef.Relocation
-
- All Implemented Interfaces:
StructConverter
- Direct Known Subclasses:
RelocByIndexGroup,RelocBySectDWithSkip,RelocIncrPosition,RelocLgByImport,RelocLgRepeat,RelocLgSetOrBySection,RelocSetPosition,RelocSmRepeat,RelocUndefinedOpcode,RelocValueGroup
public abstract class Relocation extends java.lang.Object implements StructConverter
The high-order 7 bits for the currently defined relocation opcode values. Binary values indicated by "x" are "don't care" operands. For example, any combination of the high-order 7 bits that starts with two zero bits (00) indicates the RelocBySectDWithSkip instruction. Relocation instructions are stored in 2-byte relocation blocks. Most instructions take up one block that combines an opcode and related arguments. Instructions that are larger than 2 bytes have an opcode and some of the operands in the first 2-byte block, with other operands in the following 2-byte blocks. The opcode occupies the upper (higher-order) bits of the block that contains it. Relocation instructions can be decoded from the high-order 7 bits of their first block. All currently defined relocation instructions relocate locations as words (that is, 4-byte values).
-
-
Constructor Summary
Constructors Constructor Description Relocation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidapply(ImportStateCache importState, RelocationState relocState, ContainerHeader header, Program program, MessageLog log, TaskMonitor monitor)intgetOpcode()intgetSizeInBytes()abstract booleanisMatch()DataTypetoDataType()Returns a structure datatype representing the contents of the implementor of this interface.java.lang.StringtoString()
-
-
-
Method Detail
-
isMatch
public abstract boolean isMatch()
-
apply
public abstract void apply(ImportStateCache importState, RelocationState relocState, ContainerHeader header, Program program, MessageLog log, TaskMonitor monitor)
-
getOpcode
public int getOpcode()
-
getSizeInBytes
public int getSizeInBytes()
-
toDataType
public DataType toDataType() throws DuplicateNameException, java.io.IOException
Description copied from interface:StructConverterReturns a structure datatype representing the contents of the implementor of this interface.For example, given:
class A { int foo; double bar; }The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.
- Specified by:
toDataTypein interfaceStructConverter- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException- when a datatype of the same name already existsjava.io.IOException- See Also:
StructureDataType
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-