FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
elf.hpp File Reference

A library for operations on ELF files. More...

#include <cstdint>
#include <cstdio>
#include <fstream>
#include <elf.h>
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <expected>
#include "../macro.hpp"
#include "../std/expected.hpp"
Include dependency graph for elf.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ns_elf
 ELF binary manipulation and reserved space management.
 

Macros

#define ElfW(type)
 

Functions

Value< void > ns_elf::copy_binary (fs::path const &path_file_input, fs::path const &path_file_output, std::pair< uint64_t, uint64_t > section)
 Copies the binary data between [offset.first, offset.second] from path_file_input to path_file_output.
 
Value< uint64_t > ns_elf::skip_elf_header (fs::path const &path_file_elf, uint64_t offset=0)
 Skips the elf header starting from 'offset' and returns the offset to the first byte afterwards.
 

Detailed Description

A library for operations on ELF files.

Author
Ruan Formigoni

Definition in file elf.hpp.

Macro Definition Documentation

◆ ElfW

#define ElfW ( type)
Value:
Elf32_ ## type

Definition at line 41 of file elf.hpp.