[][src]Struct falcon::loader::ElfLinker

pub struct ElfLinker { /* fields omitted */ }

Loader which links together multiple Elf files.

Can do some rudimentary linking of binaries.

Methods

impl ElfLinker[src]

pub fn new(
    filename: PathBuf,
    do_relocations: bool,
    just_interpreter: bool,
    ld_paths: Option<Vec<PathBuf>>
) -> Result<ElfLinker>
[src]

Create a new ElfLinker.

It is recommended you use ElfLinkerBuilder to build an ElfLinker.

pub fn loaded(&self) -> &BTreeMap<String, Elf>[src]

Get the ELFs loaded and linked in this loader

pub fn filename(&self) -> &Path[src]

Get the filename of the ELF we're loading

pub fn load_elf(&mut self, filename: &Path, base_address: u64) -> Result<()>[src]

Takes the path to an Elf, and a base address the Elf should be loaded at. Loads the Elf, all it's dependencies (DT_NEEDED), and then handles the supported relocations.

pub fn get_elf(&self) -> Result<&Elf>[src]

Get the Elf for the primary elf loaded.

pub fn get_interpreter(&self) -> Result<Option<&Elf>>[src]

If the primary Elf we're loading has an interpreter designated in its dynamic sectino, get the Elf for the interpreter.

pub fn add_user_function(&mut self, address: u64)[src]

Inform the linker of a function at the given address.

This function will be added to calls to function_entries and will be automatically lifted when calling to_program.

Trait Implementations

impl Debug for ElfLinker[src]

impl Loader for ElfLinker[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.