This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]