Package ghidra.program.model.reloc
Interface RelocationTable
-
- All Known Implementing Classes:
RelocationManager
public interface RelocationTableAn interface for storing the relocations defined in a program.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRELOCATABLE_PROP_NAMEName of the relocatable property in the program information property list.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Relocationadd(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.RelocationgetRelocation(Address addr)Returns the relocation with the specified address.RelocationgetRelocationAfter(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.intgetSize()Returns the number of relocation in this table.booleanisRelocatable()Returns true if this relocation table contains relocations for a relocatable binary.voidremove(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 requiredtype- the type of relocation to performvalues- the values needed when performing the relocationbytes- original instruction bytes affected by relocationthe- 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
-
-