gold linker support for shared libraries on powerpc

Hamish Macdonald Hamish.Macdonald@alcatel-lucent.com
Wed Jan 11 21:50:00 GMT 2012


Hello,

I haven't been able to determine definitively if there is support in the 
"gold" linker for generating shared libraries for powerpc (cross-linked 
on x86-linux).

My experiments seem to show that it cannot be done.  The gold linker 
complains about a relocation in my crti.o file (of type R_PPC_LOCAL24PC):

    .../target/usr/lib/crti.o: requires unsupported dynamic reloc;
    recompile with -fPIC

In addition, gold complains about about a R_POWERPC_REL32 relocation in 
my single (test) object file (which was compiled with -fPIC):

    error: shared.o: unsupported reloc 26 against global symbol
    DW.ref.__gxx_personality_v0

Granted, the compile is quite old (gcc 3.4.3).  The crti.o file comes 
from a Montavista embedded Linux distribution.

The GNU ld which came with the compiler toolchain has no problems 
creating a shared library with the identical inputs.

So, is "gold" supposed to be able to create powerpc shared libraries?

Thanks,
  Hamish.



More information about the Binutils mailing list