Struct object::read::elf::SectionTable [−][src]
The table of section headers in an ELF file.
Also includes the string table used for the section names.
Implementations
impl<'data, Elf: FileHeader> SectionTable<'data, Elf>
[src]
pub fn new(
sections: &'data [Elf::SectionHeader],
strings: StringTable<'data>
) -> Self
[src]
sections: &'data [Elf::SectionHeader],
strings: StringTable<'data>
) -> Self
Create a new section table.
pub fn iter(&self) -> Iter<'data, Elf::SectionHeader>
[src]
Iterate over the section headers.
pub fn is_empty(&self) -> bool
[src]
Return true if the section table is empty.
pub fn len(&self) -> usize
[src]
The number of section headers.
pub fn section(&self, index: usize) -> Result<&'data Elf::SectionHeader>
[src]
Return the section header at the given index.
pub fn section_by_name(
&self,
endian: Elf::Endian,
name: &[u8]
) -> Option<(usize, &'data Elf::SectionHeader)>
[src]
&self,
endian: Elf::Endian,
name: &[u8]
) -> Option<(usize, &'data Elf::SectionHeader)>
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]>
[src]
&self,
endian: Elf::Endian,
section: &'data Elf::SectionHeader
) -> Result<&'data [u8]>
Return the section name for the given section header.
pub fn symbols(
&self,
endian: Elf::Endian,
data: Bytes<'data>,
sh_type: u32
) -> Result<SymbolTable<'data, Elf>>
[src]
&self,
endian: Elf::Endian,
data: Bytes<'data>,
sh_type: u32
) -> Result<SymbolTable<'data, Elf>>
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(
&self,
endian: Elf::Endian,
data: Bytes<'data>,
index: usize
) -> Result<SymbolTable<'data, Elf>>
[src]
&self,
endian: Elf::Endian,
data: Bytes<'data>,
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>
[src]
&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,
[src]
Elf::SectionHeader: Clone,
fn clone(&self) -> SectionTable<'data, Elf>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'data, Elf: Copy + FileHeader> Copy for SectionTable<'data, Elf> where
Elf::SectionHeader: Copy,
[src]
Elf::SectionHeader: Copy,
impl<'data, Elf: Debug + FileHeader> Debug for SectionTable<'data, Elf> where
Elf::SectionHeader: Debug,
[src]
Elf::SectionHeader: Debug,
impl<'data, Elf: Default + FileHeader> Default for SectionTable<'data, Elf> where
Elf::SectionHeader: Default,
[src]
Elf::SectionHeader: Default,
fn default() -> SectionTable<'data, Elf>
[src]
Auto Trait Implementations
impl<'data, Elf> Send for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: Sync,
<Elf as FileHeader>::SectionHeader: Sync,
impl<'data, Elf> Sync for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: Sync,
<Elf as FileHeader>::SectionHeader: Sync,
impl<'data, Elf> Unpin for SectionTable<'data, Elf>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,