pub enum RelocationKind {
Show 33 variants
Absolute,
AbsoluteSet,
AbsoluteSetWord6,
AbsoluteAddition,
AbsoluteSubtraction,
AbsoluteSubtractionWord6,
AbsoluteAArch64,
PairSubtraction,
Relative,
RelativeRiscVLow12,
SymRelGotBase,
GotRelGotBase,
Got,
PltRelGotBase,
PltRelative,
GotRelative,
TlsGd,
TlsGdGot,
TlsGdGotBase,
TlsLd,
TlsLdGot,
TlsLdGotBase,
DtpOff,
GotTpOff,
GotTpOffGot,
GotTpOffGotBase,
TpOff,
TlsDesc,
TlsDescGot,
TlsDescGotBase,
TlsDescCall,
None,
Alignment,
}Expand description
For additional information on ELF relocation types, see “ELF-64 Object File Format” - https://uclibc.org/docs/elf-64-gen.pdf. For information on the TLS related relocations, see “ELF Handling For Thread-Local Storage” - https://www.uclibc.org/docs/tls.pdf.
Variants§
Absolute
The absolute address of a symbol or section.
AbsoluteSet
The absolute address of a symbol or section related to EH section.
AbsoluteSetWord6
The 6 low bits of an absolute address of a symbol or section.
AbsoluteAddition
Add the absolute address of a symbol or section at the place of the relocation to the value at the place.
AbsoluteSubtraction
Subtract the absolute address of a symbol or section at the place of the relocation from the value at the place.
AbsoluteSubtractionWord6
Subtract the absolute address of a symbol or section at the place of the relocation from the value at the place (use WORD6 type for the operation)
AbsoluteAArch64
The absolute address of a symbol or section. We are going to extract only the offset within a page, so dynamic relocation creation must be skipped.
PairSubtraction
Subtract addresses of two symbols and encode the value using ULEB128.
Relative
The address of the symbol, relative to the place of the relocation.
RelativeRiscVLow12
The address of the symbol, relative to the place of the relocation. The address of the relocation points to an instruction for which the R_RISCV_PCREL_HI20 relocation is used and that is the place we make this relocation relative to.
SymRelGotBase
The address of the symbol, relative to the base address of the GOT.
GotRelGotBase
The offset of the symbol’s GOT entry, relative to the start of the GOT.
Got
The address of the symbol’s GOT entry.
PltRelGotBase
The address of the symbol’s PLT entry, relative to the base address of the GOT.
PltRelative
The address of the symbol’s PLT entry, relative to the place of relocation.
GotRelative
The address of the symbol’s GOT entry, relative to the place of the relocation.
TlsGd
The address of a TLSGD structure, relative to the place of the relocation. A TLSGD (thread-local storage general dynamic) structure is a pair of values containing a module ID and the offset within that module’s TLS storage.
TlsGdGot
The address of the symbol’s TLSGD GOT entry.
TlsGdGotBase
The address of the symbol’s TLSGD GOT entry, relative to the start of the GOT.
TlsLd
The address of the TLS module ID for the shared object that we’re writing, relative to the place of the relocation. This is used when a TLS variable is defined and used within the same shared object.
TlsLdGot
The address of the TLS module ID for the shared object that we’re writing.
TlsLdGotBase
The address of the TLS module ID for the shared object that we’re writing, relative to the start of the GOT.
DtpOff
The offset of a thread-local within the TLS storage of DSO that defines that thread-local.
GotTpOff
The address of a GOT entry containing the offset of a TLS variable within the executable’s TLS storage, relative to the place of the relocation.
GotTpOffGot
The address of a GOT entry containing the offset of a TLS variable within the executable’s TLS storage.
GotTpOffGotBase
The address of a GOT entry containing the offset of a TLS variable within the executable’s TLS storage, relative to the start of the GOT.
TpOff
The offset of a TLS variable within the executable’s TLS storage.
TlsDesc
The address of a TLS descriptor structure, relative to the place of the relocation.
TlsDescGot
The address of a TLS descriptor structure.
TlsDescGotBase
The address of a TLS descriptor structure, relative to the start of the GOT.
TlsDescCall
Call to the TLS descriptor trampoline. Used only as a placeholder for a linker relaxation opportunity.
None
No relocation needs to be applied. Produced when we eliminate a relocation due to an optimisation.
Alignment
The address must fulfill the alignment requirement.
Implementations§
Trait Implementations§
Source§impl Clone for RelocationKind
impl Clone for RelocationKind
Source§fn clone(&self) -> RelocationKind
fn clone(&self) -> RelocationKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more