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
impl<'data, Elf: FileHeader> SectionTable<'data, Elf>
[src]
impl<'data, Elf: FileHeader> SectionTable<'data, Elf>
[src]pub fn new(
sections: &'data [Elf::SectionHeader],
strings: StringTable<'data>
) -> Self
[src]
pub fn new(
sections: &'data [Elf::SectionHeader],
strings: StringTable<'data>
) -> Self
[src]Create a new section table.
pub fn iter(&self) -> Iter<'data, Elf::SectionHeader>
[src]
pub fn iter(&self) -> Iter<'data, Elf::SectionHeader>
[src]Iterate over the section headers.
pub fn section(&self, index: usize) -> Result<&'data Elf::SectionHeader>
[src]
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]
pub fn section_by_name(
&self,
endian: Elf::Endian,
name: &[u8]
) -> Option<(usize, &'data Elf::SectionHeader)>
[src]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]
pub fn section_name(
&self,
endian: Elf::Endian,
section: &'data Elf::SectionHeader
) -> Result<&'data [u8]>
[src]Return the section name for the given section header.
pub fn symbols<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
data: R,
sh_type: u32
) -> Result<SymbolTable<'data, Elf>>
[src]
pub fn symbols<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
data: R,
sh_type: u32
) -> Result<SymbolTable<'data, Elf>>
[src]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>>
[src]
pub fn symbol_table_by_index<R: ReadRef<'data>>(
&self,
endian: Elf::Endian,
data: R,
index: usize
) -> Result<SymbolTable<'data, Elf>>
[src]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]
pub fn relocation_sections(
&self,
endian: Elf::Endian,
symbol_section: usize
) -> Result<RelocationSections>
[src]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]
impl<'data, Elf: Clone + FileHeader> Clone for SectionTable<'data, Elf> where
Elf::SectionHeader: Clone,
[src]fn clone(&self) -> SectionTable<'data, Elf>
[src]
fn clone(&self) -> SectionTable<'data, Elf>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<'data, Elf: Debug + FileHeader> Debug for SectionTable<'data, Elf> where
Elf::SectionHeader: Debug,
[src]
impl<'data, Elf: Debug + FileHeader> Debug for SectionTable<'data, Elf> where
Elf::SectionHeader: Debug,
[src]impl<'data, Elf: Default + FileHeader> Default for SectionTable<'data, Elf> where
Elf::SectionHeader: Default,
[src]
impl<'data, Elf: Default + FileHeader> Default for SectionTable<'data, Elf> where
Elf::SectionHeader: Default,
[src]fn default() -> SectionTable<'data, Elf>
[src]
fn default() -> SectionTable<'data, Elf>
[src]Returns the “default value” for a type. Read more
impl<'data, Elf: Copy + FileHeader> Copy for SectionTable<'data, Elf> where
Elf::SectionHeader: Copy,
[src]
Elf::SectionHeader: Copy,
Auto Trait Implementations
impl<'data, Elf> RefUnwindSafe for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: RefUnwindSafe,
<Elf as FileHeader>::SectionHeader: RefUnwindSafe,
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>
impl<'data, Elf> UnwindSafe for SectionTable<'data, Elf> where
<Elf as FileHeader>::SectionHeader: RefUnwindSafe,
<Elf as FileHeader>::SectionHeader: RefUnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more