Subject: Re: More ELF stuff
To: Ian Fry <Ian.Fry@sophos.com>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 02/15/2001 13:34:27
> On Thu, Feb 15, 2001 at 01:09:31PM +0000, Ben Harris wrote:
> > On Wed, 14 Feb 2001, Richard Earnshaw wrote:
> > > I haven't tested it, but I believe the patch to the compiler is trivial.  
> > > In the arm/netbsd/elf header file, after including arm.h (probably 
> > > indirectly), we simply add
> > > 
> > > #undef FLOAT_WORDS_BIG_ENDIAN
> > I think you need a way to switch this at runtime, so as to be able to
> > support FPA-style hard-float as well.
> 
> Isn't there a mechanism to do this already (in userland, at least)? You can
> specify different libraries to load based on sysctl settings in the ELF
> ld.so.conf, can't you? Couldn't we have different a different libm for
> FPA-style hardware, VFP style hardware, and load the right one depending on
> the setting of 'machdep.fpu_type' (or something)?

Because of the memory layout format changing we can never support both VFP 
and FPA at the same time without restricting one of them to 
single-precision (single precision numbers don't change layout).  Think 
about structures containing doubles being passed around in memory.

The same issue arises with soft-float if we potentially want to enable 
inter-operation with either FPA or VFP code; we have to pick the one we 
want to inter-operate with.  My proposal is that we select the ABI that is 
going to be compatible with most future processors (ie those that use a 
VFP model).

Note that for the majority of existing ARM processors, the issue is 
largely irrelevant, since they all emulate FP anyway.  The only (common) 
exception to this is the 7500FE.

R.