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]

[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.


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