eliben / pyelftools

Parsing ELF and DWARF in Python
Other
2.02k stars 510 forks source link

Increasing the size of a section (rodata) in ELF binary #373

Open Nikhil1212 opened 3 years ago

Nikhil1212 commented 3 years ago

Hi everyone, I would like to add a new string constant to my binary (ELF). So, for that, I want to increase the size of the rodata section so that my constant string fits in rodata. May I know how we can increase the size of a particular section (rodata) using pyelftools.

Thanks for the help

sevaa commented 1 year ago

ELF writing is not supported in pyelftools, and was never planned. You'll need some other ELF library.

sevaa commented 6 months ago

@Nikhil1212

There is a write capable fork of pyelftools at https://github.com/mefistotelis/pyelftools