Example codes that shows how to use libelf to manipulate ELF objects for native and non-native architectures.
This tutorial introduces the libelf library being developed at the ElfToolChain project on SourceForge.Net. It shows how this library can be used to create tools that can manipulate ELF objects for native and non-native architectures. The ELF(3)/GELF(3) APIs are discussed, as is handling of ar(1) archives. The ELF format is discussed to the extent needed to understand the use of the ELF(3) library. Knowledge of the C programming language is a pre-requisite.
- unix-like os with a c compiler
- libbsd
- libelf (version 0.8.13 or later), source code
- [optional] cmake (version 3.5 or later)
You can read the pdf libelf by examples online.