pub struct ElfFile<'data, Elf, R = &'data [u8]> where
Elf: FileHeader,
R: ReadRef<'data>, { /* private fields */ }
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, R>
type SymbolIterator = ElfSymbolIterator<'data, 'file, Elf, R>
An iterator over symbols in the object file.
type SymbolTable = ElfSymbolTable<'data, 'file, Elf, R>
type SymbolTable = ElfSymbolTable<'data, 'file, Elf, R>
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.
Return the kind of this object.
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_bytes(
&'file self,
section_name: &[u8]
) -> Option<ElfSection<'data, 'file, Elf, R>>
fn section_by_name_bytes(
&'file self,
section_name: &[u8]
) -> Option<ElfSection<'data, 'file, Elf, R>>
Like Self::section_by_name
, but allows names that are not UTF-8.
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.
fn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<ElfSymbol<'data, 'file, Elf, R>>
fn symbol_by_index(
&'file self,
index: SymbolIndex
) -> Result<ElfSymbol<'data, 'file, Elf, R>>
Get the debugging symbol at the given index. Read more
fn symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> Iterator for ElfSymbolIterator<'data, 'file, Elf, R> type Item = ElfSymbol<'data, 'file, Elf, R>;
fn symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> Iterator for ElfSymbolIterator<'data, 'file, Elf, R> type Item = ElfSymbol<'data, 'file, Elf, R>;
impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> Iterator for ElfSymbolIterator<'data, 'file, Elf, R> type Item = ElfSymbol<'data, 'file, Elf, R>;
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, R>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> Iterator for ElfSymbolIterator<'data, 'file, Elf, R> type Item = ElfSymbol<'data, 'file, Elf, R>;
fn dynamic_symbols(&'file self) -> ElfSymbolIterator<'data, 'file, Elf, R>ⓘNotable traits for ElfSymbolIterator<'data, 'file, Elf, R>impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> Iterator for ElfSymbolIterator<'data, 'file, Elf, R> type Item = ElfSymbol<'data, 'file, Elf, R>;
impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> Iterator for ElfSymbolIterator<'data, 'file, Elf, R> type Item = ElfSymbol<'data, 'file, Elf, R>;
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 base address used for relative virtual addresses. Read more
Get the endianness of the file.
Get the section named section_name
, if such a section exists. Read more
Construct a map from addresses to symbol names. Read more
Construct a map from addresses to symbol names and object file names. Read more