Package ghidra.app.util.bin.format.ne
Class SegmentRelocation
java.lang.Object
ghidra.app.util.bin.format.ne.SegmentRelocation
A class to represent a new-executable segment relocation.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
Additive relocaiton.static final byte
Import name relocation.static final byte
Import ordinal relocation.static final byte
Internal reference relocation.static final byte
Operating system fixup relocation.static final byte
A mask indicating that the low-order two-bits is the type.static final short
Moveable relocation.static final byte
32-bit pointer.static final byte
48-bit pointer.static final int[]
The number of bytes required to perform relocationstatic final byte
low byte at the specified address.static final byte
A mask indicating that the low-order nibble is the type.static final byte
16-bit pointer.static final byte
32-bit offset.static final byte
16-bit selector.static final String[]
The names of the available relocations.static final int
-
Method Summary
Modifier and TypeMethodDescriptionbyte
Returns the relocation flags.short
Returns the relocation offset.short
Returns the relocation target offset.short
Returns the relocation target segment.byte
getType()
Returns the relocation type.long[]
Returns values required to reconstruct this object.boolean
Returns true if this relocation is additive.boolean
Returns true if this relocation is an import by name.boolean
Returns true if this relocation is an import by ordinal.boolean
Returns true if this relocation is an internal reference.boolean
Returns true if this relocation is an operating system fixup.
-
Field Details
-
VALUES_SIZE
public static final int VALUES_SIZE- See Also:
-
MOVEABLE
public static final short MOVEABLEMoveable relocation.- See Also:
-
TYPE_MASK
public static final byte TYPE_MASKA mask indicating that the low-order nibble is the type.- See Also:
-
TYPE_LO_BYTE
public static final byte TYPE_LO_BYTElow byte at the specified address.- See Also:
-
TYPE_SEGMENT
public static final byte TYPE_SEGMENT16-bit selector.- See Also:
-
TYPE_FAR_ADDR
public static final byte TYPE_FAR_ADDR32-bit pointer.- See Also:
-
TYPE_OFFSET
public static final byte TYPE_OFFSET16-bit pointer.- See Also:
-
TYPE_FAR_ADDR_48
public static final byte TYPE_FAR_ADDR_4848-bit pointer.- See Also:
-
TYPE_OFFSET_32
public static final byte TYPE_OFFSET_3232-bit offset.- See Also:
-
TYPE_STRINGS
The names of the available relocations. -
TYPE_LENGTHS
public static final int[] TYPE_LENGTHSThe number of bytes required to perform relocation -
FLAG_TARGET_MASK
public static final byte FLAG_TARGET_MASKA mask indicating that the low-order two-bits is the type.- See Also:
-
FLAG_INTERNAL_REF
public static final byte FLAG_INTERNAL_REFInternal reference relocation.- See Also:
-
FLAG_IMPORT_ORDINAL
public static final byte FLAG_IMPORT_ORDINALImport ordinal relocation.- See Also:
-
FLAG_IMPORT_NAME
public static final byte FLAG_IMPORT_NAMEImport name relocation.- See Also:
-
FLAG_OS_FIXUP
public static final byte FLAG_OS_FIXUPOperating system fixup relocation.- See Also:
-
FLAG_ADDITIVE
public static final byte FLAG_ADDITIVEAdditive relocaiton.- See Also:
-
-
Method Details
-
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
-