Interface RelocationTable

  • All Known Implementing Classes:
    RelocationManager

    public interface RelocationTable
    An interface for storing the relocations defined in a program.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String RELOCATABLE_PROP_NAME
      Name of the relocatable property in the program information property list.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Relocation add​(Address addr, int type, long[] values, byte[] bytes, java.lang.String symbolName)
      Creates and adds a new relocation with the specified address, type, and value.
      Relocation getRelocation​(Address addr)
      Returns the relocation with the specified address.
      Relocation getRelocationAfter​(Address addr)
      Returns the next relocation point which follows the specified address.
      java.util.Iterator<Relocation> getRelocations()
      Returns an iterator over all relocation points (in ascending address order) located within the program.
      java.util.Iterator<Relocation> getRelocations​(AddressSetView set)
      Returns an iterator over all the relocation points (in ascending address order) located within the specified address set.
      int getSize()
      Returns the number of relocation in this table.
      boolean isRelocatable()
      Returns true if this relocation table contains relocations for a relocatable binary.
      void remove​(Relocation reloc)
      Removes the relocation object.
    • Field Detail

      • RELOCATABLE_PROP_NAME

        static final java.lang.String RELOCATABLE_PROP_NAME
        Name of the relocatable property in the program information property list.
        See Also:
        Constant Field Values
    • Method Detail

      • add

        Relocation add​(Address addr,
                       int type,
                       long[] values,
                       byte[] bytes,
                       java.lang.String symbolName)
        Creates and adds a new relocation with the specified address, type, and value.
        Parameters:
        addr - the address where the relocation is required
        type - the type of relocation to perform
        values - the values needed when performing the relocation
        bytes - original instruction bytes affected by relocation
        the - name of the symbol being relocated; may be null
        Returns:
        the newly added relocation object
      • remove

        void remove​(Relocation reloc)
        Removes the relocation object.
        Parameters:
        reloc - the relocation object to remove
      • getRelocation

        Relocation getRelocation​(Address addr)
        Returns the relocation with the specified address.
        Parameters:
        addr - the address where the relocation is defined
        Returns:
        the relocation with the specified address
      • getRelocations

        java.util.Iterator<Relocation> getRelocations()
        Returns an iterator over all relocation points (in ascending address order) located within the program.
        Returns:
        relocation iterator
      • getRelocations

        java.util.Iterator<Relocation> getRelocations​(AddressSetView set)
        Returns an iterator over all the relocation points (in ascending address order) located within the specified address set.
        Parameters:
        set - address set
        Returns:
        relocation iterator
      • getRelocationAfter

        Relocation getRelocationAfter​(Address addr)
        Returns the next relocation point which follows the specified address.
        Parameters:
        addr - starting point
        Returns:
        next relocation after addr
      • getSize

        int getSize()
        Returns the number of relocation in this table.
        Returns:
        the number of relocation in this table
      • isRelocatable

        boolean isRelocatable()
        Returns true if this relocation table contains relocations for a relocatable binary. Some binaries may contain relocations, but not actually be relocatable. For example, ELF executables.
        Returns:
        true if this relocation table contains relocations for a relocatable binary