Package ghidra.app.util.bin.format.macho
Class ScatteredRelocationInfo
- java.lang.Object
-
- ghidra.app.util.bin.format.macho.RelocationInfo
-
- ghidra.app.util.bin.format.macho.ScatteredRelocationInfo
-
- All Implemented Interfaces:
StructConverter
public class ScatteredRelocationInfo extends RelocationInfo
Represents a scattered_relocation_info structure.- See Also:
- mach-o/reloc.h
-
-
Field Summary
Fields Modifier and Type Field Description static int
R_SCATTERED
-
Fields inherited from class ghidra.app.util.bin.format.macho.RelocationInfo
r_address, r_extern, r_length, r_pcrel, r_symbolnum, r_type
-
-
Constructor Summary
Constructors Constructor Description ScatteredRelocationInfo()
DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScatteredRelocationInfo
createScatteredRelocationInfo(FactoryBundledWithBinaryReader reader)
int
getValue()
The address of the relocatable expression for the item in the file that needs to be updated if the address is changed.boolean
isScattered()
Returns true this is a scattered relocation.DataType
toDataType()
Returns a structure datatype representing the contents of the implementor of this interface.java.lang.String
toString()
long[]
toValues()
Returns the values array for storage into the program's relocation table.-
Methods inherited from class ghidra.app.util.bin.format.macho.RelocationInfo
createRelocationInfo, getAddress, getLength, getLengthInBytes, getSymbolIndex, getType, isExternal, isPcRelocated
-
-
-
-
Field Detail
-
R_SCATTERED
public static final int R_SCATTERED
- See Also:
- Constant Field Values
-
-
Method Detail
-
createScatteredRelocationInfo
public static ScatteredRelocationInfo createScatteredRelocationInfo(FactoryBundledWithBinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
isScattered
public boolean isScattered()
Returns true this is a scattered relocation.- Returns:
- true this is a scattered relocation
-
getValue
public int getValue()
The address of the relocatable expression for the item in the file that needs to be updated if the address is changed. For relocatable expressions with the difference of two section addresses, the address from which to subtract (in mathematical terms, the minuend) is contained in the first relocation entry and the address to subtract (the subtrahend) is contained in the second relocation entry.- Returns:
-
toValues
public long[] toValues()
Description copied from class:RelocationInfo
Returns the values array for storage into the program's relocation table.- Overrides:
toValues
in classRelocationInfo
- Returns:
- the values array for storage into the program's relocation table
-
toString
public java.lang.String toString()
- Overrides:
toString
in classRelocationInfo
-
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 interfaceStructConverter
- Overrides:
toDataType
in classRelocationInfo
- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException
- when a datatype of the same name already existsjava.io.IOException
- See Also:
StructureDataType
-
-