Class 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).
    • Field Detail

      • opcode

        protected int opcode
    • Constructor Detail

      • Relocation

        public Relocation()
    • Method Detail

      • isMatch

        public abstract boolean isMatch()
      • getOpcode

        public int getOpcode()
      • getSizeInBytes

        public int getSizeInBytes()
      • toDataType

        public DataType toDataType()
                            throws DuplicateNameException,
                                   java.io.IOException
        Description copied from interface: StructConverter
        Returns 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:
        toDataType in interface StructConverter
        Returns:
        returns a structure datatype representing the implementor of this interface
        Throws:
        DuplicateNameException - when a datatype of the same name already exists
        java.io.IOException
        See Also:
        StructureDataType
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object