Package ghidra.program.model.reloc
Class Relocation
java.lang.Object
ghidra.program.model.reloc.Relocation
A class to store the information needed for a single
program relocation.
-
Constructor Summary
ConstructorsConstructorDescriptionRelocation
(Address addr, int type, long[] values, byte[] bytes, String symbolName) Constructs a new relocation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the address where the relocation is required.byte[]
getBytes()
Returns the original instruction bytes affected by relocation.The name of the symbol being relocated ornull
if there is no symbol name.int
getType()
Returns the type of the relocation to perform.long[]
Returns the value needed when performing the relocation.
-
Constructor Details
-
Relocation
Constructs a new relocation.- Parameters:
addr
- the address where the relocation is requiredtype
- the type of relocation to performvalues
- the values needed when performing the relocation. Definition of values is specific to loader used and relocation type.bytes
- original instruction bytes affected by relocationsymbolName
- the name of the symbol being relocated
-
-
Method Details
-
getAddress
Returns the address where the relocation is required.- Returns:
- the address where the relocation is required
-
getType
public int getType()Returns the type of the relocation to perform.- Returns:
- the type of the relocation to perform
-
getValues
public long[] getValues()Returns the value needed when performing the relocation.- Returns:
- the value needed when performing the relocation
-
getBytes
public byte[] getBytes()Returns the original instruction bytes affected by relocation.- Returns:
- original instruction bytes affected by relocation
-
getSymbolName
The name of the symbol being relocated ornull
if there is no symbol name.- Returns:
- the name of the symbol being relocated or
null
if there is no symbol name.
-