This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Relocating an ELF file
- From: andre_hauser at hsgmed dot com
- To: binutils at sources dot redhat dot com
- Date: Fri, 7 Jun 2002 15:03:02 +0200
- Subject: Relocating an ELF file
Dear forum,
I've the following situation.
An ELF file including program header, section info, symbols and relocation
tables has to be relocated, i.e. a section has to be moved to another memory
location and all relocatable references from other sections have to be
adapted.
I tried to open the ELF file with bfd functions and then to use
bdf_perform_relocation.
I also used bfd_canonalize_symtab and bfd_canonalize_reloc to generate the
bfd internal formats.
But actually I did not have success.
What are the steps to be performed?
Do I have to use a different output file? Or can I make the original file
writeable using bfd_make_writeable?
I don't know what bfd_perform_relocation's third parameter(ptr DATA)
is(I couldn't find any information about what it stands for).
I appreciate any help!
Thanks in advance!
Regards,
Andre