[−][src]Trait object::read::elf::ProgramHeader
A trait for generic access to ProgramHeader32
and ProgramHeader64
.
Associated Types
type Word: Into<u64>
type Endian: Endian
type Elf: FileHeader<Word = Self::Word, Endian = Self::Endian>
Required methods
fn p_type(&self, endian: Self::Endian) -> u32
fn p_flags(&self, endian: Self::Endian) -> u32
fn p_offset(&self, endian: Self::Endian) -> Self::Word
fn p_vaddr(&self, endian: Self::Endian) -> Self::Word
fn p_paddr(&self, endian: Self::Endian) -> Self::Word
fn p_filesz(&self, endian: Self::Endian) -> Self::Word
fn p_memsz(&self, endian: Self::Endian) -> Self::Word
fn p_align(&self, endian: Self::Endian) -> Self::Word
Provided methods
fn file_range(&self, endian: Self::Endian) -> (u64, u64)
Return the offset and size of the segment in the file.
fn data<'data>(
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Bytes<'data>, ()>
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Bytes<'data>, ()>
Return the segment data.
Returns Err
for invalid values.
fn notes<'data>(
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Option<ElfNoteIterator<'data, Self::Elf>>>
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Option<ElfNoteIterator<'data, Self::Elf>>>
Return a note iterator for the segment data.
Returns Ok(None)
if the segment does not contain notes.
Returns Err
for invalid values.