C++ elf manipulation stuff