Struct object::read::elf::SectionTable [−][src]
pub struct SectionTable<'data, Elf: FileHeader> { /* fields omitted */ }
Expand description
The table of section headers in an ELF file.
Also includes the string table used for the section names.
Implementations
Create a new section table.
Iterate over the section headers.
Return the section header at the given index.
Return the section header with the given name.
Ignores sections with invalid names.
pub fn section_name(
&self,
endian: Elf::Endian,
section: &'data Elf::SectionHeader
) -> Result<&'data [u8]>
pub fn section_name(
&self,
endian: Elf::Endian,
section: &'data Elf::SectionHeader
) -> Result<&'data [u8]>
Return the section name for the given section header.
Return the symbol table of the given section type.
Returns an empty symbol table if the symbol table does not exist.
pub fn symbol_table_by_index<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
data: R,
index: usize
) -> Result<SymbolTable<'data, Elf>>
pub fn symbol_table_by_index<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
data: R,
index: usize
) -> Result<SymbolTable<'data, Elf>>
Return the symbol table at the given section index.
Returns an error if the section is not a symbol table.
pub fn relocation_sections(
&self,
endian: Elf::Endian,
symbol_section: usize
) -> Result<RelocationSections>
pub fn relocation_sections(
&self,
endian: Elf::Endian,
symbol_section: usize
) -> Result<RelocationSections>
Create a mapping from section index to associated relocation sections.
Trait Implementations
impl<'data, Elf: Clone + FileHeader> Clone for SectionTable<'data, Elf> where
Elf::SectionHeader: Clone,
impl<'data, Elf: Clone + FileHeader> Clone for SectionTable<'data, Elf> where
Elf::SectionHeader: Clone,
impl<'data, Elf: Debug + FileHeader> Debug for SectionTable<'data, Elf> where
Elf::SectionHeader: Debug,
impl<'data, Elf: Debug + FileHeader> Debug for SectionTable<'data, Elf> where
Elf::SectionHeader: Debug,
impl<'data, Elf: Default + FileHeader> Default for SectionTable<'data, Elf> where
Elf::SectionHeader: Default,
impl<'data, Elf: Default + FileHeader> Default for SectionTable<'data, Elf> where
Elf::SectionHeader: Default,
Returns the “default value” for a type. Read more
impl<'data, Elf: Copy + FileHeader> Copy for SectionTable<'data, Elf> where
Elf::SectionHeader: Copy,
Auto Trait Implementations
impl<'data, Elf> RefUnwindSafe for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: RefUnwindSafe,
impl<'data, Elf> Send for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: Sync,
impl<'data, Elf> Sync for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: Sync,
impl<'data, Elf> Unpin for SectionTable<'data, Elf>
impl<'data, Elf> UnwindSafe for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more