[−][src]Struct falcon::loader::ElfLinker
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]
filename: PathBuf,
do_relocations: bool,
just_interpreter: bool,
ld_paths: Option<Vec<PathBuf>>
) -> Result<ElfLinker>
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]
fn memory(&self) -> Result<Memory>
[src]
fn function_entries(&self) -> Result<Vec<FunctionEntry>>
[src]
fn program_entry(&self) -> u64
[src]
fn architecture(&self) -> &dyn Architecture
[src]
fn as_any(&self) -> &dyn Any
[src]
fn symbols(&self) -> Vec<Symbol>
[src]
fn function(&self, address: u64) -> Result<Function>
[src]
fn symbols_map(&self) -> HashMap<u64, Symbol>
[src]
fn program(&self) -> Result<Program>
[src]
fn program_verbose(
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
[src]
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
fn program_recursive(&self) -> Result<Program>
[src]
fn program_recursive_verbose(
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
[src]
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
Auto Trait Implementations
impl !RefUnwindSafe for ElfLinker
impl Send for ElfLinker
impl Sync for ElfLinker
impl Unpin for ElfLinker
impl !UnwindSafe for ElfLinker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,