Struct object::read::elf::NoteIterator
source · pub struct NoteIterator<'data, Elf>where
Elf: FileHeader,{ /* private fields */ }
Expand description
An iterator over the notes in an ELF section or segment.
Implementations§
source§impl<'data, Elf> NoteIterator<'data, Elf>where
Elf: FileHeader,
impl<'data, Elf> NoteIterator<'data, Elf>where
Elf: FileHeader,
sourcepub fn new(
endian: Elf::Endian,
align: Elf::Word,
data: &'data [u8]
) -> Result<Self>
pub fn new(
endian: Elf::Endian,
align: Elf::Word,
data: &'data [u8]
) -> Result<Self>
An iterator over the notes in an ELF section or segment.
align
should be from the p_align
field of the segment,
or the sh_addralign
field of the section. Supported values are
either 4 or 8, but values less than 4 are treated as 4.
This matches the behaviour of binutils.
Returns Err
if align
is invalid.