Library to generate ELF binaries

There are loads of libraries on crates.io for parsing ELF, but I want to generate an ELF binary as part of a toy compiler/virtual machine project. Does anyone know of an existing library for creating a valid ELF file?

I'm fine with reading up on the ELF spec and implementing this myself, but I don't want to reinvent the wheel unnecessarily.

1 Like

No clue which is best but https://crates.io/crates/faerie is used by cretonne so would be what Iā€™d look at first :slight_smile:

1 Like