A powerful C++ API for creating and parsing Executable and Linking Format (ELF) files.
#include "elfio.hpp" using namespace ELFIO; int main() { elfio elf; elf.sections.push_back(new section(".text")); elf.sections.back()->add_entry(...); }
Build robust applications that work directly with ELF binaries through modern C++
Native C++ implementation with full control over ELF structures, no bindings required
Create, modify, and analyze ELF files as memory-mapped or in-memory formats
Complete support for 32- and 64-bit ELF files with full symbol table handling
#include "elfio.hpp" #includeusing namespace ELFIO; int main() { elfio elf; // Create an ELF object elf.create(ELFCLASS64); elf.set_os_abi(ELFOSABI_NONE); // Add a section section* text_section = elf.sections.add(new section(".text", SHT_PROGBITS)); text_section->set_flags(SHF_ALLOC | SHF_EXECINSTR); // Write to a file if (elf.save("myfile.elf")) { std::cout << "ELF file created successfully!" << std::endl; } else { std::cerr << "Failed to create ELF file" << std::endl; } return 0; }
Full C++17/20 compatibility with modern build systems
Improved 64-bit format handling and tooling for large binaries
Unified ELF tooling for Windows, macOS, and Linux
Ask questions, share projects, and get help from the ELFIO development team
Join DiscussionFind or post questions about C++, ELF format, and ELFIO implementation
View QuestionsELFIO (ELF I/O) began as a C++ API in early 2000s to work with the ELF format. Through years of development and community contribution, it evolved into its current form with advanced features and cross-platform capabilities.
The project continues to be actively maintained with contributions from developers worldwide. ELFIO remains the go-to solution for working with ELF files in C++ environments.