Libelf lets you read, modify or create ELF files in an architecture-independent way. Libelf takes care of size and endian issues. For example, you can process a file for SPARC processors on an Intel-based system.
This library is a clean-room rewrite of the System V Release 4 library, and is supposed to be source code compatible with it. It was meant primarily for porting SVR4 applications to other operating systems, but can also be used as the basis for new applications (and as a light-weight alternative to libbfd).
What's New in This Release: [ read full changelog ]
· Due to some unfortunate confusion, the elf_getphnum(), elf_getshnum() and elf_getshstrndx() are not compatible between libelf implementations. Therefore, the developers decided to replace them with new functions: elf_getphdrnum(), elf_getshdrnum() and elf_getshdrstrndx(), which will always return -1 on failure and 0 on success. Code using the old interface should be upgraded to increase portability.