Class ElfRelocationTable

    • Constructor Detail

      • ElfRelocationTable

        public ElfRelocationTable()
        DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.
    • Method Detail

      • hasAddendRelocations

        public boolean hasAddendRelocations()
        Returns:
        true if has addend relocations, otherwise addend extraction from relocation target may be required
      • getSectionToBeRelocated

        public ElfSectionHeader getSectionToBeRelocated()
        Returns the section where the relocations will be applied. For example, this method will return ".plt" for ".rel.plt"
        Returns:
        the section where the relocations will be applied or null for dynamic relocation table not associated with a section.
      • getRelocations

        public ElfRelocation[] getRelocations()
        Returns the relocations defined in this table.
        Returns:
        the relocations defined in this table
      • getAssociatedSymbolTable

        public ElfSymbolTable getAssociatedSymbolTable()
        Returns the associated symbol table. A relocation object contains a symbol index. This index is into this symbol table.
        Returns:
        the associated symbol table
      • getLength

        public long getLength()
        Description copied from interface: ElfFileSection
        Length of file section in bytes
        Specified by:
        getLength in interface ElfFileSection
        Returns:
        length of file section in bytes
      • getAddressOffset

        public long getAddressOffset()
        Description copied from interface: ElfFileSection
        Preferred memory address offset where data should be loaded. The returned offset will already have the prelink adjustment applied, although will not reflect any change in the image base.
        Specified by:
        getAddressOffset in interface ElfFileSection
        Returns:
        default memory address offset where data should be loaded
      • getTableSectionHeader

        public ElfSectionHeader getTableSectionHeader()
        Get section header which corresponds to this table, or null if only associated with a dynamic table entry
        Returns:
        relocation table section header or null
      • getFileOffset

        public long getFileOffset()
        Description copied from interface: ElfFileSection
        Offset within file where section bytes are specified
        Specified by:
        getFileOffset in interface ElfFileSection
        Returns:
        offset within file where section bytes are specified
      • getEntrySize

        public int getEntrySize()
        Description copied from interface: ElfFileSection
        Size of each structured entry in bytes
        Specified by:
        getEntrySize in interface ElfFileSection
        Returns:
        entry size or -1 if variable
      • toDataType

        public DataType toDataType()
        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
        See Also:
        StructConverter.toDataType()