I try to use libelf for modify Linux kernel modules (for
When only some bytes in ELF sections' data are changed, everything
When new data blocks are appended to some sections, everything works
provided that previous blocks has been read (using elf_getdata()).
Otherwise previouse section's content are zeroed or even entire
When try to append new section to the file, either error about
insufficient memory occures at update (elf_update()) stage, or no error
generated, but section is not added.
Attached simple program demonstrates another behaviour, when section
with garbage in its header is added. Valgrind shows that library calls
pwrite() with buffer contained some unaddressable bytes.
I even try to manually mark different ELF elements as dirty (using
elf_flag*()), but nothing is changed.
Does the example is wrong? Or library contains errors in implementation?
Andrey Tsyvarev mailto:firstname.lastname@example.org
Show replies by date