A minimal, complete and correct ELF file
As part of the compiler for my homebrew language, Garlic, I've been exploring what's in an ELF file. This is so I can output a binary file, ready for execution, instead of depending on an external compiler like GCC to do that last step. As a first step, I've hand-generated, byte-by-byte, a small ELF file that can be run on a 64-bit x86-64 Linux installation.
There are some great resources out there (truly minimal ELF files for 32-bit architectures, a 64-bit tiny ELF file, a more comprehensive tu...
Read more at scratchpad.avikdas.com