[−][src]Enum solana_rbpf::elf::BPFRelocationType
BPF relocation types.
Variants
R_BPF_NONE
No relocation, placeholder
R_BPF_64_RELATIVE
64 bit relocation of a ldxdw instruction. The ldxdw instruction occupies two instruction slots. The 64-bit address to load from is split into the 32-bit imm field of each slot. The first slot's pre-relocation imm field contains the virtual address (typically same as the file offset) of the location to load. Relocation involves calculating the post-load 64-bit physical address referenced by the imm field and writing that physical address back into the imm fields of the ldxdw instruction.
R_BPF_64_32
Relocation of a call instruction.
The existing imm field contains either an offset of the instruction to jump to
(think local function call) or a special value of "-1". If -1 the symbol must
be looked up in the symbol table. The relocation entry contains the symbol
number to call. In order to support both local jumps and calling external
symbols a 32-bit hash is computed and stored in the the call instruction's
32-bit imm field. The hash is used later to look up the 64-bit address to
jump to. In the case of a local jump the hash is calculated using the current
program counter and in the case of a symbol the hash is calculated using the
name of the symbol.
Trait Implementations
impl Copy for BPFRelocationType
[src]
impl Clone for BPFRelocationType
[src]
fn clone(&self) -> BPFRelocationType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<BPFRelocationType> for BPFRelocationType
[src]
fn eq(&self, other: &BPFRelocationType) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Debug for BPFRelocationType
[src]
Auto Trait Implementations
impl Send for BPFRelocationType
impl Sync for BPFRelocationType
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,