This is the mail archive of the
mailing list for the binutils project.
Re: gold linker support for shared libraries on powerpc
- From: Cary Coutant <ccoutant at google dot com>
- To: Hamish Macdonald <Hamish dot Macdonald at alcatel-lucent dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 11 Jan 2012 14:31:24 -0800
- Subject: Re: gold linker support for shared libraries on powerpc
- References: <4F0E0400.firstname.lastname@example.org>
> 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
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.