object::read::elf

Trait Rela

Source
pub trait Rela:
    Debug
    + Pod
    + Clone {
    type Word: Into<u64>;
    type Sword: Into<i64>;
    type Endian: Endian;

    // Required methods
    fn r_offset(&self, endian: Self::Endian) -> Self::Word;
    fn r_info(&self, endian: Self::Endian, is_mips64el: bool) -> Self::Word;
    fn r_addend(&self, endian: Self::Endian) -> Self::Sword;
    fn r_sym(&self, endian: Self::Endian, is_mips64el: bool) -> u32;
    fn r_type(&self, endian: Self::Endian, is_mips64el: bool) -> u32;

    // Provided method
    fn symbol(
        &self,
        endian: Self::Endian,
        is_mips64el: bool,
    ) -> Option<SymbolIndex> { ... }
}
Expand description

A trait for generic access to elf::Rela32 and elf::Rela64.

Required Associated Types§

Required Methods§

Source

fn r_offset(&self, endian: Self::Endian) -> Self::Word

Source

fn r_info(&self, endian: Self::Endian, is_mips64el: bool) -> Self::Word

Source

fn r_addend(&self, endian: Self::Endian) -> Self::Sword

Source

fn r_sym(&self, endian: Self::Endian, is_mips64el: bool) -> u32

Source

fn r_type(&self, endian: Self::Endian, is_mips64el: bool) -> u32

Provided Methods§

Source

fn symbol(&self, endian: Self::Endian, is_mips64el: bool) -> Option<SymbolIndex>

Get the symbol index referenced by the relocation.

Returns None for the null symbol index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Endian: Endian> Rela for Rela32<Endian>

Source§

type Word = u32

Source§

type Sword = i32

Source§

type Endian = Endian

Source§

impl<Endian: Endian> Rela for Rela64<Endian>

Source§

type Word = u64

Source§

type Sword = i64

Source§

type Endian = Endian