- Overview
- ELFIO: ELF Object and Executable File Reader/Writer
- ARIO: Advanced Archive Input/Output Library
- Who Uses ELFIO & ARIO?
- Installation
- Getting Started
- Project Structure
- Examples
- Support
- Contributing
- License
- Resources
ELFIO and ARIO are robust, header-only C++ libraries designed to make binary file and archive manipulation effortless, efficient, and portable. Whether you are building compilers, linkers, binary analysis tools, or custom build systems, these libraries provide the foundation you need for working with ELF files and UNIX archives.
ELFIO is a lightweight, header-only C++ library for reading and generating ELF (Executable and Linkable Format) binary files. It is completely standalone, requiring no external dependencies, and integrates seamlessly into any C++ project. Built to ISO C++ standards, ELFIO ensures compatibility across a wide range of architectures and compilers.
Key Features:
- Header-only: Just include the header files—no need to build or link external libraries.
- No dependencies: Pure C++ implementation.
- Cross-platform: Works on Windows, Linux, and macOS.
- Comprehensive ELF support: Read, create, and modify ELF files, including sections, segments, and symbols.
- Easy integration: Designed for both small utilities and large-scale applications.
- Actively maintained: Trusted by open-source and commercial projects worldwide.
📖 Comprehensive documentation is available in the ELFIO - Tutorial and User Manual (PDF).
ARIO is a modern, high-performance, header-only C++ library for reading, creating, and modifying UNIX ar
archive files (commonly used for static libraries). ARIO is designed to work seamlessly with ELFIO, providing a unified and intuitive interface for archive manipulation and binary data management.
Why Choose ARIO?
- Header-only: Effortless integration—just include
ario.hpp
in your project. - Zero dependencies: No need for external libraries or build steps.
- Universal access: Read and write to files, memory, and custom streams.
- Cross-platform: Consistent behavior on Windows, Linux, and macOS.
- Optimized for performance: Minimal overhead for high-throughput applications.
- Seamless ELFIO integration: Easily combine ELF and archive operations in your toolchain.
- Intuitive API: Designed for productivity and ease of use.
Typical Use Cases:
- Building and modifying static libraries (
.a
files) - Extracting or replacing object files within archives
- Analyzing and manipulating symbol tables in archives
- Custom build tools and binary utilities
- Automated toolchains and CI/CD systems
- Open-source projects
- Commercial toolchains
- Academic research
- Embedded systems
- Binary analysis and reverse engineering tools
Simply copy the elfio
and/or ario
directories into your project and include the relevant headers. No build or linking steps are required.
-
Add the header files to your project:
- For ELFIO:
#include <elfio/elfio.hpp>
- For ARIO:
#include <ario/ario.hpp>
- For ELFIO:
-
No build steps required: Both libraries are header-only.
-
Example: Reading an ELF file
#include <elfio/elfio.hpp> ELFIO::elfio reader; if (reader.load("my_binary.elf")) { // Access ELF sections, segments, symbols, etc. }
-
Example: Reading an archive file
#include <ario/ario.hpp> ARIO::ario archive; if (archive.load("libmylib.a").ok()) { for (const auto& member : archive.members) { std::cout << "Member: " << member.name << std::endl; } }
elfio/
— ELFIO header filesario/
— ARIO header filesexamples/
— Example usage and sample tools
The examples/
directory contains a collection of sample programs demonstrating how to use ELFIO and ARIO in real-world scenarios. Each example focuses on a specific use case, such as reading and modifying ELF files, manipulating archive files, or integrating with C code. These examples serve both as practical tutorials and as a starting point for your own tools and applications.
Purpose:
- Illustrate typical usage patterns for ELFIO and ARIO
- Provide ready-to-use code for common binary and archive operations
- Help users quickly get started and understand library capabilities
Explore the examples/
subdirectories for detailed demonstrations, including adding sections to ELF files, anonymizing binaries, working with archives, and more.
For questions or support, please open an issue on GitHub.
Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License.