LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-04-2013, 10:39 PM   #1
dayalan_cse
Member
 
Registered: Oct 2006
Posts: 132

Rep: Reputation: 15
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.
 
Old 04-05-2013, 01:43 AM   #2
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
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
 
Old 04-05-2013, 11:46 PM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,864
Blog Entries: 1

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


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:55 PM.

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