pub struct RelocSection<'a> { /* private fields */ }
Expand description
An ELF section containing relocations, allowing lazy iteration over symbols.
Implementations§
Source§impl<'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> ⓘ
pub fn iter(&self) -> RelocIterator<'a> ⓘ
Iterate over all relocations.
Trait Implementations§
Source§impl<'a> Debug for RelocSection<'a>
impl<'a> Debug for RelocSection<'a>
Source§impl<'a> Default for RelocSection<'a>
impl<'a> Default for RelocSection<'a>
Source§fn default() -> RelocSection<'a>
fn default() -> RelocSection<'a>
Returns the “default value” for a type. Read more
Source§impl<'a, 'b> IntoIterator for &'b RelocSection<'a>
impl<'a, 'b> IntoIterator for &'b RelocSection<'a>
Auto Trait Implementations§
impl<'a> Freeze for RelocSection<'a>
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§
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