LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to edit rodata in ELF (https://www.linuxquestions.org/questions/programming-9/how-to-edit-rodata-in-elf-4175456919/)

dayalan_cse 04-04-2013 10:39 PM

How to edit rodata in ELF
 
Hi,

I have a ELF binary compiled long time back, it has got some hard-code paths referring to, now the paths is moved to another disk path so ELF binary is unable to locate the hard-coded path.

How to edit .rodata section in ELF to make it work fine.

Any help? thanks.

a4z 04-05-2013 01:43 AM

check a libelf implementation, documentation is rare, but there is a 'libelf by example' document that dscribes how to create elf objects

I recently switched to http://elfio.sourceforge.net/ , a c++ header only implementation, the samples include elf writing samples

NevemTeve 04-05-2013 11:46 PM

You should use symbolic links instead to emulate the original environment.


All times are GMT -5. The time now is 06:26 AM.