[osol-discuss] Re: GNU ld -shared fails to link filtered symbols on Solaris

Martin Man Martin.Man@Sun.COM
Tue Nov 28 08:18:00 GMT 2006


Rod Evans wrote:
> Alan Modra wrote:
> 
>> You seem to want some other sort of treatment of ABS symbols, as
>> needing .plt or .got entries, I presume.  I think that might be OK
>> too, but may require some redesign of GNU ld.  The trouble is that
>> GNU ld has just one ABS section internally.  That means that ABS
>> symbols are lumped together and lose their association with a
>> particular object file.  I'm reasonably certain that this will cause
>> you some trouble.
> 
> Well, I'm not very familiar with the gnu linker, but Martins experiments
> seem to suggest that the treatment of an ABS definition is inconsistent -
> sometimes they result in UNDEF references, other times ABS.

This is the point, under certain circumstances (-Wl,-shared) the 
absolute symbols are linked in as, well, absolute symbols, whereas 
without -Wl,-shared they are treated *properly* as undefs, despite the 
fact that they are indeed defined in the -lpthread or -ldl as absolute 
symbols.

Looks like inconsistency to me.

> Martin might have to add some c stub functions to his builds so that
> his libraries provide non-ABS filter symbols in the mean time.

This wouldn't help at all, since GNU linker would produce code which 
calls these stubs in the end, instead of redirecting to the filtee (I 
believe).

HTH,
Martin

P.S. so what should we do next?

-- 
http://martinman.net



More information about the Binutils mailing list