maat::loader::Loader class

Loader interface for loading executables into a MaatEngine

Contents

❱   Public functions

void load(MaatEngine* engine, const std::string& binary, loader::Format type, addr_t base, const std::vector<CmdlineArg>& args, const environ_t& envp, const std::unordered_map<std::string, std::string>& virtual_fs, const std::list<std::string>& libdirs, const std::list<std::string>& ignore_libs, bool interpreter = true) virtual
Load a binary in engine

❱   Function documentation

void maat::loader::Loader::load(MaatEngine* engine, const std::string& binary, loader::Format type, addr_t base, const std::vector<CmdlineArg>& args, const environ_t& envp, const std::unordered_map<std::string, std::string>& virtual_fs, const std::list<std::string>& libdirs, const std::list<std::string>& ignore_libs, bool interpreter = true) virtual

Load a binary in engine

Parameters
engine
binary Path of the executable file
type Executable format of the executable to load
base Base address where to load the binary (used if relocatable or position independent code)
args Command line arguments with whom to invoke the executable
envp
virtual_fs Location of loaded binaries and libraries in the emulated filesystem. Maps the object(s) filenames to their path(s) in the virtual filesystem, eg: { "libc.so.6": "/usr/lib" }
libdirs Directories where to search for shared objects the binary might depend on
ignore_libs List of libraries to NOT load even though the binary lists them as dependencies. This option has no effect when 'interpreter' is 'true'
interpreter If set to True, load and emulate the interpreter and let it load the binary and dependencies by itself. The interpreter binary must be found in one of the 'libdirs' directories. If the interpreter is missing, Maat loads the binary and dependencies manually