Struct elfkit::elf::Elf
[−]
[src]
pub struct Elf { pub header: Header, pub segments: Vec<SegmentHeader>, pub sections: Vec<Section>, // some fields omitted }
Fields
header: Header
segments: Vec<SegmentHeader>
sections: Vec<Section>
Methods
impl Elf
[src]
fn from_reader<R>(io: &mut R) -> Result<Elf, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
fn load_at(&mut self, i: usize) -> Result<(), Error>
[src]
fn load_all(&mut self) -> Result<(), Error>
[src]
fn store_all(&mut self) -> Result<(), Error>
[src]
fn sync_all(&mut self) -> Result<(), Error>
[src]
write out everything to linked sections, such as string tables after calling this function, size() is reliable for all sections
fn to_writer<R>(&mut self, io: &mut R) -> Result<(), Error> where
R: Write + Seek,
[src]
R: Write + Seek,
fn remove_section(&mut self, at: usize) -> Result<Section, Error>
[src]
fn insert_section(&mut self, at: usize, sec: Section) -> Result<(), Error>
[src]
fn move_section(&mut self, from: usize, to: usize) -> Result<(), Error>
[src]
impl Elf
[src]
fn contains_symbol(&mut self, name: &str) -> Result<bool, Error>
[src]
check if a global defined symbol is exported from the elf file. can be used to avoid load_all if a particular elf file doesn't contain the symbol you need anyway. It uses the cheapest possible method to determine the result which is currently loading symtab into a hashmap TODO should be replaced with checking HASH and GNU_HASH