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: objcopy to binary versus linking to binary


On Wed, 14 Mar 2007, Diego 'Flameeyes' Pettenò wrote:
> If I link the object files in an ELF file and then use objcopy to output them
> to binary, the code is correct and work sfine.
> If I link the object files directly in a binary file through the linker
> script, some bytes are off, for instance the branch instructions points to an
> address 1 byte off the correct one (and so aren't even disasembled correctly
> by objdump later on).

My initial guess (not wanting to spend time analyzing this but
having experience doing similar) is that there's a bug in
h8_elf_howto_table.

Why?  Because when linking to ELF, elf32_h8_relocate_section
(elf32_h8_final_link_relocate) is used, but when linking to
another format, the information h8_elf_howto_table is used.

brgds, H-P


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