[PATCH, rs6000] ELFv2 ABI 1/8: Add options and infrastructure

Ulrich Weigand uweigand@de.ibm.com
Tue Nov 12 22:34:00 GMT 2013


Jakub Jelinek wrote:
> On Mon, Nov 11, 2013 at 03:40:48PM +0100, Ulrich Weigand wrote:
> > @@ -355,7 +364,11 @@ extern int dot_symbols;
> >  #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
> >  
> >  #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
> > -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
> > +#ifdef LINUX64_DEFAULT_ABI_ELFv2
> > +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
> > +#else
> > +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
> > +#endif
> 
> I agree with Joseph that it would be nice to keep the number of supported
> ABIs down, if it could be old powerpc64-linux big-endian ELFv1 and powerpc64le-linux
> ELFv2 only, that would be ideal.

Those are the only two we plan to support.

> Can little-endian and big-endian binaries
> coexist on the same kernel, or will there be big endian only kernels vs.
> little endian only kernels?  If they can coexist, perhaps it would be better
> to use different libQUAL suffix from lib64 (lib64be?), if they can't, using lib64
> is fine.  If they can coexist, then there is certainly an issue with various
> shared binary files that typically some way handle different word size these
> days, but not endianity (utmp/wtmp, ld.so.cache, locale-archive, various
> other files).

While the architecute in theory supports running big-endian and little-endian
processes at the same time, this would also require Linux kernel support;
basically, an endian-swapping system call translation layer.  We have no
plan to implement anything like this.

The kernel will be able to start up both ELFv1 and ELFv2 binaries (of the
same byte order).  However, this is only relevant for testing and possibly
bringup/transition period purposes, since we're not planning on actually
officially supporting both ABI versions in the same byte order, see above.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list