[−][src]Struct elfkit::elf::Elf
Fields
header: Header
segments: Vec<SegmentHeader>
sections: Vec<Section>
Methods
impl Elf
[src]
pub fn from_header(header: Header) -> Self
[src]
pub fn from_reader<R>(io: &mut R) -> Result<Elf, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn load<R>(&mut self, i: usize, io: &mut R) -> Result<(), Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn load_all<R>(&mut self, io: &mut R) -> Result<(), Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub 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
pub fn to_writer<R>(&mut self, io: R) -> Result<(), Error> where
R: Write + Seek,
[src]
R: Write + Seek,
pub fn make_symtab_gnuld_compat(&mut self) -> Result<(), Error>
[src]
gnu ld compatibility. this is very inefficent, but not doing this might break some GNU tools that rely on specific gnu-ld behaviour
- reorder symbols to have GLOBAL last
- remove original SECTION symbols and add offset to reloc addend instead
- insert new symbol sections on the top
pub fn reorder(self: &mut Elf) -> Result<HashMap<usize, usize>, Error>
[src]
reorder to minimize segmentation will only reorder sections that come after the last locked section
pub fn layout(self: &mut Elf) -> Result<(), Error>
[src]
pub fn remove_section(&mut self, at: usize) -> Result<Section, Error>
[src]
pub fn insert_section(&mut self, at: usize, sec: Section) -> Result<(), Error>
[src]
pub fn move_section(&mut self, from: usize, to: usize) -> Result<(), Error>
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,