Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-04-2013, 11:39 PM   #1
Registered: Oct 2006
Posts: 124

Rep: Reputation: 15
How to edit rodata in ELF


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.
Old 04-05-2013, 02:43 AM   #2
Registered: Feb 2009
Posts: 947

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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 , a c++ header only implementation, the samples include elf writing samples
Old 04-06-2013, 12:46 AM   #3
Senior Member
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 2,648

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
You should use symbolic links instead to emulate the original environment.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Linux ELF Format and win32 ELF Format cmemo Linux - Hardware 1 05-11-2007 06:32 PM
Difference between Linux ELF Format and win32 ELF Format cmemo Linux - General 1 05-11-2007 04:44 PM
Difference between Linux ELF Format and win32 ELF Format cmemo Linux - Software 1 05-11-2007 04:31 PM

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration