Why __libc_internal_tsd_get/__libc_internal_tsd_set

H.J. Lu hjl@varesearch.com
Fri Mar 19 14:20:00 GMT 1999


> 
> > Could someone please tell me why we make __libc_internal_tsd_get and
> > __libc_internal_tsd_set common? 
> 
> This was explained on this very mailing list at the time of the change.
> Since these symbols are used within the dynamic linker itself in code that
> runs at bootstrap time, a special kludge was required to make undefined
> weak symbols suffice.  With uninitialized common definitions, the kludge is
> not required, and the code is simpler and saves a run-time compare and
> branch during symbol lookup, the results of that comparison being constant
> after bootstrap time.

I was wrong about __libc_internal_tsd_get and __libc_internal_tsd_set
being common. But they have to be exported from libc so that -lpthread
will overwrite them. My linuxthreads patch

        * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
	Added to GLIBC_2.0 for libc.so.

fixes them.


H.J.



More information about the Libc-hacker mailing list