Struct solana_rbpf::elf_parser::Elf64
source · [−]pub struct Elf64<'a> { /* private fields */ }
Expand description
The parsed structure of an ELF file
Implementations
sourceimpl<'a> Elf64<'a>
impl<'a> Elf64<'a>
sourcepub fn parse(elf_bytes: &'a [u8]) -> Result<Self, ElfParserError>
pub fn parse(elf_bytes: &'a [u8]) -> Result<Self, ElfParserError>
Parse from the given byte slice
sourcepub fn file_header(&self) -> &Elf64Ehdr
pub fn file_header(&self) -> &Elf64Ehdr
Returns the file header.
sourcepub fn program_header_table(&self) -> &[Elf64Phdr]
pub fn program_header_table(&self) -> &[Elf64Phdr]
Returns the program header table.
sourcepub fn section_header_table(&self) -> &[Elf64Shdr]
pub fn section_header_table(&self) -> &[Elf64Shdr]
Returns the section header table.
sourcepub fn dynamic_symbol_table(&self) -> Option<&[Elf64Sym]>
pub fn dynamic_symbol_table(&self) -> Option<&[Elf64Sym]>
Returns the dynamic symbol table.
sourcepub fn dynamic_relocations_table(&self) -> Option<&[Elf64Rel]>
pub fn dynamic_relocations_table(&self) -> Option<&[Elf64Rel]>
Returns the dynamic relocations table.
sourcepub fn get_string_in_section(
&self,
section_header: &Elf64Shdr,
offset_in_section: Elf64Word,
maximum_length: usize
) -> Result<&'a str, ElfParserError>
pub fn get_string_in_section(
&self,
section_header: &Elf64Shdr,
offset_in_section: Elf64Word,
maximum_length: usize
) -> Result<&'a str, ElfParserError>
Query a single string from a section which is marked as SHT_STRTAB
sourcepub fn section_name(&self, sh_name: Elf64Word) -> Result<&'a str, ElfParserError>
pub fn section_name(&self, sh_name: Elf64Word) -> Result<&'a str, ElfParserError>
Returns the string corresponding to the given sh_name
sourcepub fn symbol_name(&self, st_name: Elf64Word) -> Result<&'a str, ElfParserError>
pub fn symbol_name(&self, st_name: Elf64Word) -> Result<&'a str, ElfParserError>
Returns the name of the st_name
symbol
sourcepub fn symbol_table(&self) -> Result<Option<&'a [Elf64Sym]>, ElfParserError>
pub fn symbol_table(&self) -> Result<Option<&'a [Elf64Sym]>, ElfParserError>
Returns the symbol table
sourcepub fn dynamic_symbol_name(
&self,
st_name: Elf64Word
) -> Result<&'a str, ElfParserError>
pub fn dynamic_symbol_name(
&self,
st_name: Elf64Word
) -> Result<&'a str, ElfParserError>
Returns the name of the st_name
dynamic symbol
sourcepub fn get_symbol_table_of_section(
&self,
section_header: &Elf64Shdr
) -> Result<&'a [Elf64Sym], ElfParserError>
pub fn get_symbol_table_of_section(
&self,
section_header: &Elf64Shdr
) -> Result<&'a [Elf64Sym], ElfParserError>
Returns the symbol table of a section which is marked as SHT_SYMTAB
sourcepub fn slice_from_program_header<T: 'static>(
&self,
_: &Elf64Phdr
) -> Result<&'a [T], ElfParserError>
pub fn slice_from_program_header<T: 'static>(
&self,
_: &Elf64Phdr
) -> Result<&'a [T], ElfParserError>
Returns the &[T]
contained in the data described by the given program
header
sourcepub fn slice_from_section_header<T: 'static>(
&self,
_: &Elf64Shdr
) -> Result<&'a [T], ElfParserError>
pub fn slice_from_section_header<T: 'static>(
&self,
_: &Elf64Shdr
) -> Result<&'a [T], ElfParserError>
Returns the &[T]
contained in the section data described by the given
section header
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Elf64<'a>
impl<'a> Send for Elf64<'a>
impl<'a> Sync for Elf64<'a>
impl<'a> Unpin for Elf64<'a>
impl<'a> UnwindSafe for Elf64<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more