This is the mail archive of the 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]

[Gold] Question: Arm BE8 implementation


I'm trying to implement BE8 support in the gold linker for Arm.

The bfd linker uses elf32_arm_section_map to determine the range of
addresses for byte swapping before writing out the section. Is it
accurate to say that the equivalent data structure in gold is
mapping_symbols_info in class Arm_relobj ? Using small examples, I'm
able to see that all the required address ranges are covered in this
mapping table (except the plt).

I'm having some difficulty in deciding the right place to introduce
the swaps in gold, which should happen after all relaxation and
relocation are completed. From my limited understanding of the code,
in Arm_relobj::do_relocate_sections, all sections in an object file
have been relocated and should be a good place to insert the byte
swaps. I went ahead and implemented the byte swapping before returning
from Arm_relobj::do_relocate_sections using the information from
Arm_relobj::mapping_symbols_info. However, for a simple example, I see
that some ranges are not swapped in the final executable, even though
those ranges are being processed for swapping. This makes me suspect
that either I'm not swapping at the right place or in the right output

I'm attaching my current patch in progress. Any pointers would be very helpful.


Description: Text document

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