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]
fn default() -> RelocSection<'a>
[src]
impl<'a, 'b> IntoIterator for &'b RelocSection<'a>
[src]
type Item = <RelocIterator<'a> as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = RelocIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,