Question on how to copy an elf file and edit the .preinit_array section

Anastasios Andronidis
Thu Jun 11 14:25:54 GMT 2020

Hello everyone!

 Could someone please help me with this:

I'm trying to do some runtime manipulation of an elf file and I'm a little bit lost with how to use libelf :/

Basically I want to copy an elf file to a new one and edit .preinit_array section. This is similar to what objcopy --add-section would do, but I only care about the elf headers and using libelf to achieve this.


More information about the Elfutils-devel mailing list