|
FlatImage
A configurable Linux containerization system
|
Functions | |
| Value< void > | relocate_impl (char **argv, uint32_t offset, fs::path const &path_file_self) |
| Relocate the binary (by copying it) from the image. | |
Variables | |
| constexpr std::array< const char *, 403 > const | arr_busybox_applet |
|
inlinenodiscard |
Relocate the binary (by copying it) from the image.
The binary is copied from the image to the instance directory, for an execve to be performed. This is done to free the main flatimage file to mount the filesystems.
| argv | Argument vector passed to the main program |
| offset | Offset to the reserved space, past the elf and appended binaries |
| path_file_self | Path to the current executable binary |
Lambda function to write a binary by reading its ELF header offset
Extracts a binary from the flatimage by reading its ELF header to determine size, and writes it to the specified path. Skips if the file already exists.
| path_file | Destination path for the extracted binary |
| offset_end | Current end offset in the source file |
Lambda function to write a binary by reading size metadata at a specific offset
Reads a uint64_t size value at the specified offset, then extracts that many bytes to write the binary to the specified path. Skips if the file already exists.
| file_binary | Input stream positioned in the source flatimage file |
| path_file | Destination path for the extracted binary |
| offset_end | Current end offset in the source file |
Definition at line 85 of file relocate.hpp.
|
constexpr |
Definition at line 38 of file relocate.hpp.