Is it possible to parse an ELF, modify the header fields an export the new ELF with pyelftools? Can you add some example code?