Trait object::read::elf::Rel

source ·
pub trait Rel:
    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) -> Self::Word;
    fn r_sym(&self, endian: Self::Endian) -> u32;
    fn r_type(&self, endian: Self::Endian) -> u32;

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

A trait for generic access to elf::Rel32 and elf::Rel64.

Required Associated Types§

Required Methods§

source

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

source

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

source

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

source

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

Provided Methods§

source

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

Get the symbol index referenced by the relocation.

Returns None for the null symbol index.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Endian: Endian> Rel for Rel32<Endian>

source§

type Word = u32

source§

type Sword = i32

source§

type Endian = Endian

source§

impl<Endian: Endian> Rel for Rel64<Endian>

source§

type Word = u64

source§

type Sword = i64

source§

type Endian = Endian