This is the mail archive of the binutils@sourceware.org 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]

Re: .data.rel Section Contains Both Data and Relocatable Symbols


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


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