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
impl Rel
Sourcepub fn from_binary<D: Parser + Seeker>(reader: D) -> Result<Self>
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
.
Sourcepub fn relocations(&self) -> RelocationIterator<'_> ⓘ
pub fn relocations(&self) -> RelocationIterator<'_> ⓘ
Relocation iterator.
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more