.data.rel Section Contains Both Data and Relocatable Symbols

Nick Clifton nickc@redhat.com
Thu Mar 29 03:09:00 GMT 2007


Hi Anthony,

> The only problem is that I am converting the elf to binary.  How can I
> copy the relocation records to the final binary?

The "binary" file format does not have support for relocs, so you will 
not be able to copy the relocation records when converting to this 
format.  Your choices are either

   1. Stick with the ELF format and do not use the BINARY format.

   2. Create a new enhanced version of the BINARY format that does 
support relocations and then use that.

   3. Have two files.  One the binary image to be loaded and the other 
containing the relocs for that image.  This second file could just be 
the original ELF image file, or some other format that you have 
invented.  If necessary you will have to write a tool that strips out 
the relocation records from the ELF binary and stores them into this 
second file.

Cheers
   Nick



More information about the Binutils mailing list