This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[ARM] BE8 support in relocations
- From: Christophe LYON <christophe dot lyon at st dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Thu, 11 Feb 2010 16:36:01 +0100
- Subject: [ARM] BE8 support in relocations
Hello,
I am confused by the way elf32_arm_final_link_relocate handles reading
and writing according to the endianness.
Indeed, in ARM's BE8 mode, data and code have different endianness, but
this function uses bfd_get_XX and bfd_put_XX which don't take this into
account.
For instance, it begins with
addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
which reads the right value in -BE and -LE but not in -BE8 in case the
current reloc operates on a branch instruction (because it's encoded
within code, in LE, but bfd_get_32 will read it in BE).
Is this a bug or am I missing something?
Thanks,
Christophe.