문제

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