質問

I have an ELF executable and I would like to know how can I modify its .rodata segment.

Also, more generally, how can I modify an ELF executable?

役に立ちましたか?

解決

You can use any hexeditor to do that, if you know precisely which part of ELF you need to modify.

If you want to parse ELFs and do more complex logic you should write some code which will open file or better, mmap it. Then you can read ELF header which gives basic information about ELF and points to other important places in ELF. I suggest reading manual for ELF and <include/elf.h>.

If you are using Linux, you can view where sections lie in memory using readelf or objdump.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top