Elftoolchain
The Elftoolchain project offers liberally-licensed tools and libraries for program development. The project has been in existence since 2008.
Home page: https://elftoolchain.sourceforge.io/.
News / Recent Posts
- Upcoming Opensource Work - Apr 28, 2022
- Elftoolchain v0.7.1 - Feb 20, 2016
- New release: ELF Toolchain v0.6.1 - Sep 25, 2012
- A build system for the Elftoolchain project - Jul 7, 2012
Downstream Uses
Base System Imports
Elftoolchain has been designed to be suitable for inclusion into the base systems of OS projects. Examples of such uses include:
-
FreeBSD: contrib/elftoolchain - most tools and libraries.
-
Minix: external/bsd/elftoolchain -
libelf
andlibdwarf
. -
NetBSD: src/external/bsd/elftoolchain -
libelf
andlibdwarf
. -
RTEMS: rtems-tools/rtemstoolkit/elftoolchain -
libelf
,libdwarf
andlibelftc
.
As Installable Packages
Elftoolchain’s tools and libraries are also available as standalone packages:
-
Via Pkgsrc: devel/elftoolchain.
-
Via Macports: devel/elftoolchain.
Selected Sub-Projects
Some of the these projects may be suitable for GSoC projects.
Please see also: Roadmap.
-
A Text to ELF/DWARF Compiler
Human-readable specifications of ELF and DWARF fragments.
-
A PEG Parser Generator for the Base System
An easy-to-use parser generator with good error recovery.
Articles
(Tutorial) Libelf by Example
This is a short introduction to libelf
, a library for manipulating
ELF objects.
It covers:
-
Getting started with libelf: obtaining a handle to an ELF object, establishing a working ELF version, and handling errors reported by libelf.
-
How ELF data structures are laid out in-memory and on disk, the notions of "file representation" and "memory representation", how to write applications that can handle non-native binaries.
-
ELF Segments and the ELF Program Header Table, retrieving the program header table from an ELF executable and the meaning of the fields of a program header table entry.
-
How data is stored inside ELF sections, the ELF Section Header Table, and how to traverse the sections in an ELF object.
-
How to create new ELF objects: the rules for ordering individual API calls, the default object layout implemented by libelf, and how to specify custom layouts.
-
ar
archives: their structure, and how to read the contents of these archives using the APIs provided by libelf.
Download Links
-
Libelf by Example (at Leanpub).
-
Libelf by Example (at SourceForge).