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 linker support for shared libraries on powerpc


> 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).

I suspect that the ppc support in gold is not yet complete.

> 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

This relocation, as I understand it, is normally expected to be a
non-interposable reference to _GLOBAL_OFFSET_TABLE_. If the linker is
deciding that it needs a dynamic relocation here, it would be because
the symbol is undefined. I'm not sure why it would be undefined.

> 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

This relocation is not expected to be used with a global symbol,
according to the powerpc target code in gold. If that's not accurate,
then gold will need to be fixed to handle it.

-cary


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