The elf-edit library provides a datatype suitable for reading and writing ELF files.
It is a fork of the original elf package on Hackage, but enables modifying and serializing ELF files. These changes are not backwards compatible and hence we have a new name.