wasmer_compiler::types::relocation

Trait RelocationLike

Source
pub trait RelocationLike {
    // Required methods
    fn kind(&self) -> RelocationKind;
    fn reloc_target(&self) -> RelocationTarget;
    fn offset(&self) -> CodeOffset;
    fn addend(&self) -> Addend;

    // Provided method
    fn for_address(
        &self,
        start: usize,
        target_func_address: u64,
    ) -> (usize, u64) { ... }
}
Expand description

Any struct that acts like a Relocation.

Required Methods§

Provided Methods§

Source

fn for_address(&self, start: usize, target_func_address: u64) -> (usize, u64)

Given a function start address, provide the relocation relative to that address.

The function returns the relocation address and the delta.

Implementors§