Class LoaderRelocationHeader

  • All Implemented Interfaces:
    StructConverter

    public class LoaderRelocationHeader
    extends java.lang.Object
    implements StructConverter
    See Apple's -- PEFBinaryFormat.h
     struct PEFLoaderRelocationHeader {
         UInt16   sectionIndex;     // Index of the section to be fixed up.
         UInt16   reservedA;        // Reserved, must be zero.
         UInt32   relocCount;       // Number of 16 bit relocation chunks.
         UInt32   firstRelocOffset; // Offset of first relocation instruction.
     };
     
     typedef UInt16 PEFRelocChunk;
     
    • Method Detail

      • getSectionIndex

        public short getSectionIndex()
        The sectionIndex field (2 bytes) designates the section number to which this relocation header refers.
        Returns:
        section number to which this relocation header refers
      • getReservedA

        public short getReservedA()
        Reserved, must be set to zero (0).
        Returns:
        reserved, must be set to zero (0)
      • getRelocCount

        public int getRelocCount()
        The relocCount field (4 bytes) indicates the number of 16-bit relocation blocks for this section.
        Returns:
        number of 16-bit relocation blocks for this section
      • getFirstRelocOffset

        public int getFirstRelocOffset()
        The firstRelocOffset field (4 bytes) indicates the byte offset from the start of the relocations area to the first relocation instruction for this section.
        Returns:
        offset from the start of the relocations area to the first relocation
      • getRelocations

        public java.util.List<Relocation> getRelocations()
      • 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