// http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
// http://www.ouah.org/RevEng/x430.htm
// Format of an ELF executable file
#define ELF_MAGIC 0x464C457FU // "\x7FELF" in little endian
// File header
struct elfhdr {
uint magic; // must equal ELF_MAGIC
uchar elf[12];
ushort type; // 1, 2, 3, 4 specify whether the object is relocatable, executable, shared, or core, respectively
ushort machine; // Specifies target instruction set architecture.
uint version; // Set to 1 for the original version of ELF
uint entry; // This is the memory address of the entry point from where the process starts executing. This field is either 32 or 64 bits long depending on the format defined earlier
uint phoff; // Points to the start of the program header table. It usually follows the file header immediately making the offset 0x40 for 64-bit ELF executables
uint shoff; // Points to the start of the section header table
uint flag