Struct goblin::elf::reloc::RelocSection [−][src]
An ELF section containing relocations, allowing lazy iteration over symbols.
Implementations
impl<'a> RelocSection<'a>
[src][−]
pub fn parse(
bytes: &'a [u8],
offset: usize,
filesz: usize,
is_rela: bool,
ctx: Ctx
) -> Result<RelocSection<'a>>
[src][−]
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
.
pub fn get(&self, index: usize) -> Option<Reloc>
[src][−]
Try to parse a single relocation from the binary, at index
.
pub fn len(&self) -> usize
[src][−]
The number of relocations in the section.
pub fn is_empty(&self) -> bool
[src][−]
Returns true if section has no relocations.
pub fn iter(&self) -> RelocIterator<'a>ⓘNotable traits for RelocIterator<'a>
impl<'a> Iterator for RelocIterator<'a> type Item = Reloc;
[src][−]
Notable traits for RelocIterator<'a>
impl<'a> Iterator for RelocIterator<'a> type Item = Reloc;
Iterate over all relocations.
pub fn to_vec(&self) -> Vec<Reloc>
[src][−]
Parse all relocations into a vector.
Trait Implementations
impl<'a> Debug for RelocSection<'a>
[src][+]
impl<'a> Default for RelocSection<'a>
[src][+]
impl<'a, 'b> IntoIterator for &'b RelocSection<'a>
[src][+]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,