Struct object::read::elf::ElfFile [−][src]
pub struct ElfFile<'data, Elf, R = &'data [u8]> where
Elf: FileHeader,
R: ReadRef<'data>, { /* fields omitted */ }
Expand description
A partially parsed ELF file.
Most of the functionality of this type is provided by the Object
trait implementation.
Implementations
Returns the raw ELF file header.
Returns the raw ELF segments.
Trait Implementations
impl<'data, 'file, Elf, R> Object<'data, 'file> for ElfFile<'data, Elf, R> where
'data: 'file,
Elf: FileHeader,
R: 'file + ReadRef<'data>,
impl<'data, 'file, Elf, R> Object<'data, 'file> for ElfFile<'data, Elf, R> where
'data: 'file,
Elf: FileHeader,
R: 'file + ReadRef<'data>,
type Segment = ElfSegment<'data, 'file, Elf, R>
type Segment = ElfSegment<'data, 'file, Elf, R>
A segment in the object file.
type SegmentIterator = ElfSegmentIterator<'data, 'file, Elf, R>
type SegmentIterator = ElfSegmentIterator<'data, 'file, Elf, R>
An iterator over the segments in the object file.
type Section = ElfSection<'data, 'file, Elf, R>
type Section = ElfSection<'data, 'file, Elf, R>
A section in the object file.
type SectionIterator = ElfSectionIterator<'data, 'file, Elf, R>
type SectionIterator = ElfSectionIterator<'data, 'file, Elf, R>
An iterator over the sections in the object file.
type ComdatIterator = ElfComdatIterator<'data, 'file, Elf, R>
type ComdatIterator = ElfComdatIterator<'data, 'file, Elf, R>
An iterator over the COMDAT section groups in the object file.
type SymbolIterator = ElfSymbolIterator<'data, 'file, Elf>
type SymbolIterator = ElfSymbolIterator<'data, 'file, Elf>
An iterator over symbols in the object file.
type SymbolTable = ElfSymbolTable<'data, 'file, Elf>
type SymbolTable = ElfSymbolTable<'data, 'file, Elf>
A symbol table in the object file.
type DynamicRelocationIterator = ElfDynamicRelocationIterator<'data, 'file, Elf, R>
type DynamicRelocationIterator = ElfDynamicRelocationIterator<'data, 'file, Elf, R>
An iterator over dynamic relocations in the file. Read more
Get the architecture type of the file.
Return true if the file is little endian, false if it is big endian.
fn segments(&'file self) -> ElfSegmentIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSegmentIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf, R> Iterator for ElfSegmentIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfSegment<'data, 'file, Elf, R>;
fn segments(&'file self) -> ElfSegmentIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSegmentIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf, R> Iterator for ElfSegmentIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfSegment<'data, 'file, Elf, R>;
impl<'data, 'file, Elf, R> Iterator for ElfSegmentIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfSegment<'data, 'file, Elf, R>;
Get an iterator over the segments in the file.
fn section_by_name(
&'file self,
section_name: &str
) -> Option<ElfSection<'data, 'file, Elf, R>>
fn section_by_name(
&'file self,
section_name: &str
) -> Option<ElfSection<'data, 'file, Elf, R>>
Get the section named section_name
, if such a section exists. Read more
fn section_by_index(
&'file self,
index: SectionIndex
) -> Result<ElfSection<'data, 'file, Elf, R>>
fn section_by_index(
&'file self,
index: SectionIndex
) -> Result<ElfSection<'data, 'file, Elf, R>>
Get the section at the given index. Read more
fn sections(&'file self) -> ElfSectionIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSectionIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf, R> Iterator for ElfSectionIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfSection<'data, 'file, Elf, R>;
fn sections(&'file self) -> ElfSectionIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSectionIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf, R> Iterator for ElfSectionIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfSection<'data, 'file, Elf, R>;
impl<'data, 'file, Elf, R> Iterator for ElfSectionIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfSection<'data, 'file, Elf, R>;
Get an iterator over the sections in the file.
fn comdats(&'file self) -> ElfComdatIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfComdatIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf, R> Iterator for ElfComdatIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfComdat<'data, 'file, Elf, R>;
fn comdats(&'file self) -> ElfComdatIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfComdatIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf, R> Iterator for ElfComdatIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfComdat<'data, 'file, Elf, R>;
impl<'data, 'file, Elf, R> Iterator for ElfComdatIterator<'data, 'file, Elf, R> where
Elf: FileHeader,
R: ReadRef<'data>, type Item = ElfComdat<'data, 'file, Elf, R>;
Get an iterator over the COMDAT section groups in the file.
Get the debugging symbol at the given index. Read more
fn symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf>impl<'data, 'file, Elf: FileHeader> Iterator for ElfSymbolIterator<'data, 'file, Elf> type Item = ElfSymbol<'data, 'file, Elf>;
fn symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf>impl<'data, 'file, Elf: FileHeader> Iterator for ElfSymbolIterator<'data, 'file, Elf> type Item = ElfSymbol<'data, 'file, Elf>;
impl<'data, 'file, Elf: FileHeader> Iterator for ElfSymbolIterator<'data, 'file, Elf> type Item = ElfSymbol<'data, 'file, Elf>;
Get an iterator over the debugging symbols in the file. Read more
Get the symbol table, if any.
fn dynamic_symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf>impl<'data, 'file, Elf: FileHeader> Iterator for ElfSymbolIterator<'data, 'file, Elf> type Item = ElfSymbol<'data, 'file, Elf>;
fn dynamic_symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf>impl<'data, 'file, Elf: FileHeader> Iterator for ElfSymbolIterator<'data, 'file, Elf> type Item = ElfSymbol<'data, 'file, Elf>;
impl<'data, 'file, Elf: FileHeader> Iterator for ElfSymbolIterator<'data, 'file, Elf> type Item = ElfSymbol<'data, 'file, Elf>;
Get an iterator over the dynamic linking symbols in the file. Read more
Get the dynamic linking symbol table, if any. Read more
fn dynamic_relocations(
&'file self
) -> Option<ElfDynamicRelocationIterator<'data, 'file, Elf, R>>
fn dynamic_relocations(
&'file self
) -> Option<ElfDynamicRelocationIterator<'data, 'file, Elf, R>>
Get the dynamic relocations for this file. Read more
Return true if the file contains debug information sections, false if not.
The build ID from an ELF NT_GNU_BUILD_ID
note.
The filename and CRC from a .gnu_debuglink
section.
The filename and build ID from a .gnu_debugaltlink
section.
Get the endianness of the file.
Construct a map from addresses to symbol names. Read more
Construct a map from addresses to symbol names and object file names. Read more