Struct Rel

Source
pub struct Rel {
Show 15 fields pub module: u32, pub version: u32, pub name_offset: u32, pub name_size: u32, pub sections: Vec<Section>, pub import_tables: Vec<ImportTable>, pub prolog: Option<Symbol>, pub epilog: Option<Symbol>, pub unresolved: Option<Symbol>, pub alignment: u32, pub bss_alignment: u32, pub fix_size: u32, pub relocation_offset: Option<u32>, pub import_offset: Option<u32>, pub import_size: Option<u32>,
}
Expand description

.rel file object.

Fields§

§module: u32

The module number. Must be unique per .rel file.

§version: u32

The version number of the .rel file.

§name_offset: u32

The offset of the name of the module. The name is available in the framework.str.

§name_size: u32

The size of the name of the module.

§sections: Vec<Section>

Sections.

§import_tables: Vec<ImportTable>

Import tables.

§prolog: Option<Symbol>

The prolog symbol.

§epilog: Option<Symbol>

The epilog symbol.

§unresolved: Option<Symbol>

The unresolved symbol. This function is called when a symbol is not could not be resolved.

§alignment: u32

Section alignment.

§bss_alignment: u32

.bss section alignment.

§fix_size: u32

parse: Unknown.

§relocation_offset: Option<u32>

parse: Relocation offset.

§import_offset: Option<u32>

parse: Import offset.

§import_size: Option<u32>

parse: Import size.

Implementations§

Source§

impl Rel

Source

pub fn from_binary<D: Parser + Seeker>(reader: D) -> Result<Self>

Parse Rel from binary stream.

This function should not panic and if any error occurs, it will return Err of type Error/ParseProblem.

Source

pub fn relocations(&self) -> RelocationIterator<'_>

Relocation iterator.

Trait Implementations§

Source§

impl Clone for Rel

Source§

fn clone(&self) -> Rel

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Rel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Rel

§

impl RefUnwindSafe for Rel

§

impl Send for Rel

§

impl Sync for Rel

§

impl Unpin for Rel

§

impl UnwindSafe for Rel

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.