Class ELFStandardRelocOperations
java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.ELFStandardRelocOperations
Default implementation for ELF relocation operations, for a given relocation. It can be
overridden to add operations or customize existing common operations (A, S, P, B).
This class contains operations shared among architectures.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longActual image base.final longDifference between the actual and preferred image bases.final IELFUnitELF unit.final EndiannessFile endianness.final IVirtualMemoryMemory object.final IELFRelocationEntryRelocation entry.final IELFRelocationTableRelocation table.final IELFSymbolEntrySymbol entry, if any.final longTarget address of the relocation.final longPreferred image base. -
Constructor Summary
ConstructorsConstructorDescriptionELFStandardRelocOperations(IELFRelocationApplicator.RelocatedFile relocEnvironment, IELFRelocationApplicator.RelocInstance relocInstance) Create standard relocation operations. -
Method Summary
Modifier and TypeMethodDescriptionlongA()Represents the addend used to compute the value of the relocatable field.longB()Represents the base address at which a shared object was loaded.longP()Represents the place, as section offset or address, of the storage unit being relocated.longS()Represents the value of the symbol whose index resides in the relocation entry.
-
Field Details
-
elfUnit
ELF unit. -
mem
Memory object. -
actualImageBase
public final long actualImageBaseActual image base. -
theoriticalImageBase
public final long theoriticalImageBasePreferred image base. -
deltaImageBase
public final long deltaImageBaseDifference between the actual and preferred image bases. -
se
Symbol entry, if any. -
relocEntry
Relocation entry. -
relocTable
Relocation table. -
targetAddress
public final long targetAddressTarget address of the relocation. -
endianness
File endianness.
-
-
Constructor Details
-
ELFStandardRelocOperations
public ELFStandardRelocOperations(IELFRelocationApplicator.RelocatedFile relocEnvironment, IELFRelocationApplicator.RelocInstance relocInstance) Create standard relocation operations.- Parameters:
relocEnvironment- relocation file informationrelocInstance- relocation instance information
-
-
Method Details
-
A
Represents the addend used to compute the value of the relocatable field.- Returns:
- addend value
- Throws:
MemoryException- if the implicit addend cannot be read
-
S
public long S()Represents the value of the symbol whose index resides in the relocation entry.- Returns:
- symbol value
-
P
public long P()Represents the place, as section offset or address, of the storage unit being relocated.- Returns:
- relocation place
-
B
public long B()Represents the base address at which a shared object was loaded.- Returns:
- actual image base
-