pub struct RelocSection<'a> { /* private fields */ }
Expand description
An ELF section containing relocations, allowing lazy iteration over symbols.
Implementations
sourceimpl<'a> RelocSection<'a>
impl<'a> RelocSection<'a>
sourcepub fn parse(
bytes: &'a [u8],
offset: usize,
filesz: usize,
is_rela: bool,
ctx: Ctx
) -> Result<RelocSection<'a>>
pub fn parse(
bytes: &'a [u8],
offset: usize,
filesz: usize,
is_rela: bool,
ctx: Ctx
) -> Result<RelocSection<'a>>
Parse a REL or RELA section of size filesz
from offset
.
sourcepub fn get(&self, index: usize) -> Option<Reloc>
pub fn get(&self, index: usize) -> Option<Reloc>
Try to parse a single relocation from the binary, at index
.
sourcepub fn iter(&self) -> RelocIterator<'a>ⓘNotable traits for RelocIterator<'a>impl<'a> Iterator for RelocIterator<'a> type Item = Reloc;
pub fn iter(&self) -> RelocIterator<'a>ⓘNotable traits for RelocIterator<'a>impl<'a> Iterator for RelocIterator<'a> type Item = Reloc;
Iterate over all relocations.
Trait Implementations
sourceimpl<'a> Debug for RelocSection<'a>
impl<'a> Debug for RelocSection<'a>
sourceimpl<'a> Default for RelocSection<'a>
impl<'a> Default for RelocSection<'a>
sourcefn default() -> RelocSection<'a>
fn default() -> RelocSection<'a>
Returns the “default value” for a type. Read more
sourceimpl<'a, 'b> IntoIterator for &'b RelocSection<'a>
impl<'a, 'b> IntoIterator for &'b RelocSection<'a>
type Item = <RelocIterator<'a> as Iterator>::Item
type Item = <RelocIterator<'a> as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = RelocIterator<'a>
type IntoIter = RelocIterator<'a>
Which kind of iterator are we turning this into?
Auto Trait Implementations
impl<'a> RefUnwindSafe for RelocSection<'a>
impl<'a> Send for RelocSection<'a>
impl<'a> Sync for RelocSection<'a>
impl<'a> Unpin for RelocSection<'a>
impl<'a> UnwindSafe for RelocSection<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more