Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 10:39 PM   #1
Registered: Oct 2006
Posts: 131

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, 01:43 AM   #2
Senior Member
Registered: Feb 2009
Posts: 1,395

Rep: Reputation: 598Reputation: 598Reputation: 598Reputation: 598Reputation: 598Reputation: 598
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-05-2013, 11:46 PM   #3
Senior Member
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,240

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
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 05:32 PM
Difference between Linux ELF Format and win32 ELF Format cmemo Linux - General 1 05-11-2007 03:44 PM
Difference between Linux ELF Format and win32 ELF Format cmemo Linux - Software 1 05-11-2007 03:31 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:26 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