This is the mail archive of the
mailing list for the binutils project.
Re: gold linker support for shared libraries on powerpc
> Hmm... ? Here is the relocation and symbol information from crti.o. ?When I
> did a quick check with the debugger,
> it appears to be the first relocation (the _GLOBAL_OFFSET_TABLE_ relative
> one) with which it is unhappy. ?The symbol is undefined (presumably as
> expected) in the crti.o object file. ?Presumably the linker should be
> providing a definition, however (although that definition may not yet exist
> when gold is processing the relocations in crti.o).
Yep. It looks like the current support only creates the GOT section in
response to specific relocation types, but not in response to other
relocations that reference _GLOBAL_OFFSET_TABLE_. That's probably a
bug that needs to be fixed.
>>> In addition, gold complains about about a R_POWERPC_REL32 relocation in
>>> 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.
> The relocation is in the ".eh_frame" section.
Yeah, I'd guess that this is just part of the incompleteness of the
PPC support in gold. The Scan::global() function needs to be extended
to support this relocation.
It sounds like you're getting fairly familiar with the workings of
gold. Would you be willing to contribute the fixes needed?