[−][src]Trait falcon::loader::Loader
Generic trait for all loaders
Required methods
fn memory(&self) -> Result<Memory>
Get a model of the memory contained in the binary
fn function_entries(&self) -> Result<Vec<FunctionEntry>>
Get addresses for known function entries
fn program_entry(&self) -> u64
The address program execution should begin at
fn architecture(&self) -> &dyn Architecture
Get the architecture of the binary
fn as_any(&self) -> &dyn Any
Cast loader to Any
fn symbols(&self) -> Vec<Symbol>
Get the symbols for this loader
Provided methods
fn function(&self, address: u64) -> Result<Function>
Lift just one function from the executable
fn symbols_map(&self) -> HashMap<u64, Symbol>
Get the symbols as a hashmap by address
fn program(&self) -> Result<Program>
Lift executable into an il::Program.
Individual functions which fail to lift are omitted and ignored.
fn program_verbose(
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
Lift executable into an il::Program
.
Errors encountered while lifting specific functions are collected, and
returned with the FunctionEntry
identifying the function. Only
catastrophic errors should cause this function call to fail.
fn program_recursive(&self) -> Result<Program>
Lift executable into an il::Program
, while recursively resolving branch
targets into functions.
program_recursive silently drops any functions that cause lifting
errors. If you care about those, use program_recursive_verbose
.
fn program_recursive_verbose(
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
&self
) -> Result<(Program, Vec<(FunctionEntry, Error)>), Error>
Lift executable into an il::Program
, while recursively resolving branch
targets into functions.
Works in a similar manner to program_recursive