Package ghidra.app.util.bin.format.ne
Class SegmentRelocation
- java.lang.Object
-
- ghidra.app.util.bin.format.ne.SegmentRelocation
-
public class SegmentRelocation extends java.lang.ObjectA class to represent a new-executable segment relocation.
-
-
Field Summary
Fields Modifier and Type Field Description static byteFLAG_ADDITIVEAdditive relocaiton.static byteFLAG_IMPORT_NAMEImport name relocation.static byteFLAG_IMPORT_ORDINALImport ordinal relocation.static byteFLAG_INTERNAL_REFInternal reference relocation.static byteFLAG_OS_FIXUPOperating system fixup relocation.static byteFLAG_TARGET_MASKA mask indicating that the low-order two-bits is the type.static shortMOVEABLEMoveable relocation.static byteTYPE_FAR_ADDR32-bit pointer.static byteTYPE_FAR_ADDR_4848-bit pointer.static int[]TYPE_LENGTHSThe number of bytes required to perform relocationstatic byteTYPE_LO_BYTElow byte at the specified address.static byteTYPE_MASKA mask indicating that the low-order nibble is the type.static byteTYPE_OFFSET16-bit pointer.static byteTYPE_OFFSET_3232-bit offset.static byteTYPE_SEGMENT16-bit selector.static java.lang.String[]TYPE_STRINGSThe names of the available relocations.static intVALUES_SIZE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetFlagByte()Returns the relocation flags.shortgetOffset()Returns the relocation offset.shortgetTargetOffset()Returns the relocation target offset.shortgetTargetSegment()Returns the relocation target segment.bytegetType()Returns the relocation type.long[]getValues()Returns values required to reconstruct this object.booleanisAdditive()Returns true if this relocation is additive.booleanisImportName()Returns true if this relocation is an import by name.booleanisImportOrdinal()Returns true if this relocation is an import by ordinal.booleanisInternalRef()Returns true if this relocation is an internal reference.booleanisOpSysFixup()Returns true if this relocation is an operating system fixup.
-
-
-
Field Detail
-
VALUES_SIZE
public static final int VALUES_SIZE
- See Also:
- Constant Field Values
-
MOVEABLE
public static final short MOVEABLE
Moveable relocation.- See Also:
- Constant Field Values
-
TYPE_MASK
public static final byte TYPE_MASK
A mask indicating that the low-order nibble is the type.- See Also:
- Constant Field Values
-
TYPE_LO_BYTE
public static final byte TYPE_LO_BYTE
low byte at the specified address.- See Also:
- Constant Field Values
-
TYPE_SEGMENT
public static final byte TYPE_SEGMENT
16-bit selector.- See Also:
- Constant Field Values
-
TYPE_FAR_ADDR
public static final byte TYPE_FAR_ADDR
32-bit pointer.- See Also:
- Constant Field Values
-
TYPE_OFFSET
public static final byte TYPE_OFFSET
16-bit pointer.- See Also:
- Constant Field Values
-
TYPE_FAR_ADDR_48
public static final byte TYPE_FAR_ADDR_48
48-bit pointer.- See Also:
- Constant Field Values
-
TYPE_OFFSET_32
public static final byte TYPE_OFFSET_32
32-bit offset.- See Also:
- Constant Field Values
-
TYPE_STRINGS
public static final java.lang.String[] TYPE_STRINGS
The names of the available relocations.
-
TYPE_LENGTHS
public static final int[] TYPE_LENGTHS
The number of bytes required to perform relocation
-
FLAG_TARGET_MASK
public static final byte FLAG_TARGET_MASK
A mask indicating that the low-order two-bits is the type.- See Also:
- Constant Field Values
-
FLAG_INTERNAL_REF
public static final byte FLAG_INTERNAL_REF
Internal reference relocation.- See Also:
- Constant Field Values
-
FLAG_IMPORT_ORDINAL
public static final byte FLAG_IMPORT_ORDINAL
Import ordinal relocation.- See Also:
- Constant Field Values
-
FLAG_IMPORT_NAME
public static final byte FLAG_IMPORT_NAME
Import name relocation.- See Also:
- Constant Field Values
-
FLAG_OS_FIXUP
public static final byte FLAG_OS_FIXUP
Operating system fixup relocation.- See Also:
- Constant Field Values
-
FLAG_ADDITIVE
public static final byte FLAG_ADDITIVE
Additive relocaiton.- See Also:
- Constant Field Values
-
-
Method Detail
-
isInternalRef
public boolean isInternalRef()
Returns true if this relocation is an internal reference.- Returns:
- true if this relocation is an internal reference
-
isImportOrdinal
public boolean isImportOrdinal()
Returns true if this relocation is an import by ordinal.- Returns:
- true if this relocation is an import by ordinal
-
isImportName
public boolean isImportName()
Returns true if this relocation is an import by name.- Returns:
- true if this relocation is an import by name
-
isOpSysFixup
public boolean isOpSysFixup()
Returns true if this relocation is an operating system fixup.- Returns:
- true if this relocation is an operating system fixup
-
isAdditive
public boolean isAdditive()
Returns true if this relocation is additive. If this bit is set, then add relocation to existing value. Otherwise overwrite the existing value.- Returns:
- true if this relocation is additive.
-
getType
public byte getType()
Returns the relocation type.- Returns:
- the relocation type
-
getFlagByte
public byte getFlagByte()
Returns the relocation flags.- Returns:
- the relocation flags
-
getOffset
public short getOffset()
Returns the relocation offset.- Returns:
- the relocation offset
-
getTargetSegment
public short getTargetSegment()
Returns the relocation target segment.- Returns:
- the relocation target segment
-
getTargetOffset
public short getTargetOffset()
Returns the relocation target offset.- Returns:
- the relocation target offset
-
getValues
public long[] getValues()
Returns values required to reconstruct this object.- Returns:
- values required to reconstruct this object
-
-