[gccsdk] Shared library status update

Lee leenoar at sky.com
Thu Jan 10 11:24:00 PST 2008

John Tytgat wrote:
> In message <4783DAD3.3010206 at sky.com>
>           Lee <leenoar at sky.com> wrote:
>> I believe the __som_got__ symbol is causing some problems because it is
>> automatically being hidden by version scripts when it should be
>> exported. This is because is starts with an underscore, which I used to
>> emphasize the fact that it's a system symbol. I could rename it to
>> som___got, which unfortunately brings it into the user namespace, but I
>> think the use of 3 underscores in the middle should ensure that it
>> doesn't clash with any user symbols.
> I think it would be a benefit not to have need to have a __som_got__ (or
> other similar named) symbol pointing to the start of the GOT.  Why is it
> that we (RISC OS port) need it and AFAICS other platforms don't ?

The problem I had was that there was no concrete way of finding the GOT
at all times. Normally, the dynamic segment has a DT_PLTGOT entry that
points to the GOT, however, if there is no PLT (i.e. no exported
functions), then there is no DT_PLTGOT. Such libraries may be rare, but
we already have one in GCCSDK in the form of libm. _GLOBAL_OFFSET_TABLE_
points to the GOT, but that is hidden and also start with an underscore
anyway. We need the address of the GOT to initialise the runtime system, 
a system that other platforms don't require.

I'm sure that if I rename it then it will not be such a problem any


More information about the gcc mailing list