This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: Why __libc_internal_tsd_get/__libc_internal_tsd_set
- To: roland@frob.com (Roland McGrath)
- Subject: Re: Why __libc_internal_tsd_get/__libc_internal_tsd_set
- From: hjl@varesearch.com (H.J. Lu)
- Date: Fri, 19 Mar 1999 13:49:13 -0800 (PST)
- Cc: libc-hacker@cygnus.com (GNU C Library)
>
> > 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.