Hi all.
As part of another project, I have recently finished work on an ELF format parser library written in SPARK, which can be easily interfaced with from a C/C++ program.
It currently supports parsing ELF headers and section headers, including with the extended section header specification (i.e. when the file has more than 65535 section headers). In addition, it is able to handle ELF files from different endianness. All headers are returned in pages of 32 to make SPARK validation and interfacing with C++ a bit easier. The library does not currently support e_shstrndx parsing.
Feedback is appreciated and feel free to extend as needed.