Class SegmentRelocation


  • public class SegmentRelocation
    extends java.lang.Object
    A class to represent a new-executable segment relocation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte getFlagByte()
      Returns the relocation flags.
      short getOffset()
      Returns the relocation offset.
      short getTargetOffset()
      Returns the relocation target offset.
      short getTargetSegment()
      Returns the relocation target segment.
      byte getType()
      Returns the relocation type.
      long[] getValues()
      Returns values required to reconstruct this object.
      boolean isAdditive()
      Returns true if this relocation is additive.
      boolean isImportName()
      Returns true if this relocation is an import by name.
      boolean isImportOrdinal()
      Returns true if this relocation is an import by ordinal.
      boolean isInternalRef()
      Returns true if this relocation is an internal reference.
      boolean isOpSysFixup()
      Returns true if this relocation is an operating system fixup.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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_FAR_ADDR_48

        public static final byte TYPE_FAR_ADDR_48
        48-bit pointer.
        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