Re: ARM EABI support for StrongArm SA-110

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29/05/2019 14:31, Florian Weimer wrote:
> Does GCC support EABI for the SA-110?  I see a reference for a SA-110
> CPU quirk, and there are -mtune options as well.  But it's unclear to me
> if this CPU model is compatible with EABI (as far as support is
> implemented in GCC).
> 
> I'm asking because we have a legacy feature in glibc which interfaces
> with kernel support for Netwinder devices.  glibc requires EABI, and if
> GCC does not support it for this CPU, then the code is dead and can be
> removed/stubbed out (to preserve ABI).
> 
> Thanks,
> Florian
> 

That's a harder question than it might sound.  The answer is mostly.

The problem stems from the fact that StrongArm has no support for the
Thumb instruction set, and in particular lacks support for the BX
instruction in the ARM part of the instruction set that is used to call
or return from functions written in Thumb.

The EABI mandates that code be compiled in a manner compatible with
arm/thumb interworking and that in turn implies that BX must be used in
indirect calls and function returns.

Now obviously StrongArm lacks that instruction, but to handle EABI
compatibility we ignore that during compilation and fix it up during
linking (we mark the uses of BX with a special relocation).  Obviously
to run on StrongArm you can't include any Thumb code itself during the link.

So in summary, it should work and we do state that it is compatible with
the ABI, but it is a bit tricky to get it all right.

R.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux