Binary Dependency Resolution This header contains the functions needed to determine the dependencies needed for binary files. It does this both against traditional ELF binaries, leveraging LDD in libraries.hpp, but also supports tokenizing and parsing shell scripts to extract shebangs and commands used for dynamic dependency resolution. This support is far more nuanced than in Python-SB, as we incorporate variables and using the shell interpreter itself to uncover libraries and binaries inaccessible to the old tokenizer.
More...
|
|
using | bin_t = shared::set |
| |
|
| void | parse (bin_t &required, std::string path, libraries::lib_t &libraries) |
| | Parse a binary to determine dependencies.
|
| |
| void | setup (const bin_t &binaries, shared::vector &command) |
| | Setup the sandbox for the used binaries.
|
| |
| void | symlink (shared::vector &command) |
| | Symlink to /usr/bin.
|
| |
|
|
set | searched = {} |
| |
|
set | builtins = {"printf", "echo"} |
| |
Binary Dependency Resolution This header contains the functions needed to determine the dependencies needed for binary files. It does this both against traditional ELF binaries, leveraging LDD in libraries.hpp, but also supports tokenizing and parsing shell scripts to extract shebangs and commands used for dynamic dependency resolution. This support is far more nuanced than in Python-SB, as we incorporate variables and using the shell interpreter itself to uncover libraries and binaries inaccessible to the old tokenizer.
◆ parse()
| void binaries::parse |
( |
bin_t & | required, |
|
|
std::string | path, |
|
|
libraries::lib_t & | libraries ) |
Parse a binary to determine dependencies.
- Parameters
-
| required | The binary accumulator. |
| path | The path to the binary. |
| libraries | The current list of libraries. |
- Note
- libraries are updated.
◆ setup()
| void binaries::setup |
( |
const bin_t & | binaries, |
|
|
shared::vector & | command ) |
Setup the sandbox for the used binaries.
- Parameters
-
| binaries | The binaries to link into the sandbox. |
| application | The application to link to this SOF. |
| command | The sandbox command |
◆ symlink()
| void binaries::symlink |
( |
shared::vector & | command | ) |
|
Symlink to /usr/bin.
- Parameters
-
| command | The command to append to. |