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: GOLD: RFA: Add support for RX target


> > +   if (target->uses_bigendian_data ())
> 
> s/ ()/()/

Why doesn't gold follow the GNU coding standards?

> > +   if (uses_bigendian_data ())
> 
> This line should be
>   if (this->uses_bigendian_data())

Why?  This throws away the huge benefit of having the implied "this".

> Yes, there ought to be a better way to do this.  If your code is
> correct, then it looks like the problem is that you have a little-endian
> object but the reloc fields are written with big-endian data.

The RX chip has selectable endianness for data, but always uses the
same endianness for opcode fields.  Unfortunately, the opcode LINE
fetch *does* go through the data endianness swapper, so you have to
compensate for that when generating the final ELF image.  I.e. opcode
*fields* are not swapped, but the opcode *section* *is*.

As an aside, the external bus unit allows you to *further* specify
endianness (as same vs swapped) on a per-chip-select basis, for
external peripherals.  So executing from external RAM may involve up
to three swaps (linker, bus, fetch) before an opcode is executed.


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