Struct elfloader::ElfBinary [−][src]
pub struct ElfBinary<'s> { /* fields omitted */ }
Abstract representation of a loadable ELF binary.
Methods
impl<'s> ElfBinary<'s>
[src]
impl<'s> ElfBinary<'s>
pub fn new(name: &'s str, region: &'s [u8]) -> Option<ElfBinary<'s>>
[src]
pub fn new(name: &'s str, region: &'s [u8]) -> Option<ElfBinary<'s>>
Create a new ElfBinary. Makes sure that the provided region has valid ELF magic byte sequence and is big enough to contain at least the ELF file header otherwise it will return None.
pub fn program_headers(&self) -> &'s [ProgramHeader]
[src]
pub fn program_headers(&self) -> &'s [ProgramHeader]
Create a slice of the program headers.
pub fn symbol_name(&self, symbol: &'s Symbol) -> &'s str
[src]
pub fn symbol_name(&self, symbol: &'s Symbol) -> &'s str
pub fn section_data(&self, section: &'s SectionHeader) -> &'s [u8]
[src]
pub fn section_data(&self, section: &'s SectionHeader) -> &'s [u8]
pub fn section_name(&self, section: &'s SectionHeader) -> &'s str
[src]
pub fn section_name(&self, section: &'s SectionHeader) -> &'s str
pub fn for_each_symbol<F: FnMut(&'s Symbol)>(&self, func: F)
[src]
pub fn for_each_symbol<F: FnMut(&'s Symbol)>(&self, func: F)
pub fn section_headers(&self) -> &'s [SectionHeader]
[src]
pub fn section_headers(&self) -> &'s [SectionHeader]
Create a slice of the section headers.
pub fn load(&self, loader: &mut ElfLoader)
[src]
pub fn load(&self, loader: &mut ElfLoader)