convert elf file to single c/c++ header file

elf-to-c-header

Split ELF to single C/C++ header file.

Usage:

g++ elf-to-c-header.cpp
./elf-to-c-header "file.elf"

Output (at out.h):

#ifndef vm_elf_h
#define vm_elf_h

unsigned long vm_entry = 120;
unsigned char vm_text_section_data [] = { -1,67,0 ...};
unsigned long vm_text_section_size = 248;
unsigned long vm_text_section_offset = 65536;
unsigned long vm_text_section_start = 1342177280;
unsigned char vm_bss_section_data [] = { 0,0,0,0 };
unsigned long vm_bss_section_size = 4;
unsigned long vm_bss_section_offset = 65784;
unsigned char vm_symtab_section_data [] = { 0,0 ...};
unsigned long vm_symtab_section_size = 408;
unsigned long vm_symtab_section_offset = 65784;
unsigned char vm_strtab_section_data [] = { 0,109 ...};
unsigned long vm_strtab_section_size = 72;
unsigned long vm_strtab_section_offset = 66192;
unsigned char vm_shstrtab_section_data [] = { 0,46 ...};
unsigned long vm_shstrtab_section_size = 38;
unsigned long vm_shstrtab_section_offset = 66264;

#endif
Similar Resources

A header only C++ library that provides type safety and user defined literals for physical units

SI - Type safety for physical units A header only c++ library that provides type safety and user defined literals for handling pyhsical values defined

Dec 25, 2022

Header-only C++20 wrapper for MPI 4.0.

MPI Modern C++20 message passing interface wrapper. Examples Initialization: mpi::environment environment; const auto& communicator = mpi::world_c

Apr 8, 2022

Small Header only library to parse argv for flags

Small Header only library to parse argv for flags

Nov 9, 2022

Header-only lock-free synchronization utilities (one writer, many readers).

stupid Header-only lock-free synchronization utilities (one writer, many readers). No queues Base functionality The base functionality of this library

Nov 28, 2022

This is a Header-only c++ string implentation which specializes in dealing with small strings. 🧵

This is a Header-only c++ string implentation which specializes in dealing with small strings. 🧵

string-impl This is a Header-only c++ string implentation which specializes in dealing with small strings. 🧵 Usage ⌨ Instantiation A string can be in

Oct 26, 2022

Header only roguelike rendering library.

Header only roguelike rendering library. Support for Opengl33 and Raylib. Features Support for custom glyph atlasses with up to 65655 tiles of custom

Dec 15, 2022

Locate the current executable and the current module/library on the file system

Where Am I? A drop-in two files library to locate the current executable and the current module on the file system. Supported platforms: Windows Linux

Dec 27, 2022

Simple .INI file parser in C, good for embedded systems

inih (INI Not Invented Here) inih (INI Not Invented Here) is a simple .INI file parser written in C. It's only a couple of pages of code, and it was d

Jan 2, 2023

ini file parser

Iniparser 4 I - Overview This modules offers parsing of ini files from the C level. See a complete documentation in HTML format, from this directory o

Jan 1, 2023
Dead simple C logging library contained in a single header (.h) file
Dead simple C logging library contained in a single header (.h) file

Seethe Logging so simple, you only need to include a single header file. seethe supports 6 different log levels (DEBUG, INFO, NOTICE, WARNING, ERROR,

Nov 24, 2022
RapidObj is an easy-to-use, single-header C++17 library that loads and parses Wavefront .obj files.

RapidObj About Integration Prerequisites Manual Integration CMake Integration API RapidObj Result Next Steps OS Support Third Party Tools and Resource

Jan 2, 2023
curl4cpp - single header cURL wrapper for C++ around libcURL.

curl4cpp - single header cURL wrapper for C++ around libcURL.

Oct 13, 2022
A shebang-friendly script for "interpreting" single C99, C11, and C++ files, including rcfile support.

c99sh Basic Idea Control Files Shebang Tricks C++ C11 Credits Basic Idea A shebang-friendly script for "interpreting" single C99, C11, and C++ files,

Dec 3, 2022
GPU Task Spooler - A SLURM alternative/job scheduler for a single simulation machine
GPU Task Spooler - A SLURM alternative/job scheduler for a single simulation machine

GPU Task Spooler - A SLURM alternative/job scheduler for a single simulation machine

Jan 6, 2023
Small header-only C++ library that helps to initialize Vulkan instance and device object

Vulkan Extensions & Features Help, or VkExtensionsFeaturesHelp, is a small, header-only, C++ library for developers who use Vulkan API.

Oct 12, 2022
match(it): A lightweight header-only pattern-matching library for C++17 with macro-free APIs.

match(it): A lightweight header-only pattern-matching library for C++17 with macro-free APIs. Features Easy to get started. Single header library. Mac

Dec 27, 2022
A Header-Only Engine that tries to use SFML in a deeper level

⚙️ SFML-Low-Level-Engine ⚙️ A header-only library that tries to use SFML at a deeper level ?? Instalation Download the source code and put the GLD fol

Aug 27, 2021
C++ header-only library for generic data validation.

C++ header-only library for generic data validation.

Dec 6, 2022
a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.

UNITS A compile-time, header-only, dimensional analysis library built on c++14 with no dependencies. Get in touch If you are using units.h in producti

Dec 29, 2022