This patch adds the majority of the work needed for writing binary ELF stub files. While only the dynamic entries are written as contents, most of this patch involves the surrounding framework of an ELF file that allows the .dynamic and .dynstr sections to exist happily.
- Writes section headers.
- Writes two program headers (PT_DYNAMIC and a PT_LOAD).
- Writes .dynstr (only containing strings from .dynamic).
- Writes .dynamic.
- Writes .shstrtab.
This patch is very large, and may later be broken down if possible.