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: hjl@varesearch.com (H.J. Lu)
- Subject: Re: Why __libc_internal_tsd_get/__libc_internal_tsd_set
- From: Roland McGrath <roland@frob.com>
- Date: Fri, 19 Mar 1999 14:13:19 -0500
- Cc: wmglo@dent.med.uni-muenchen.de (Wolfram Gloger), libc-hacker@cygnus.com (GNU C Library)
- Emacs: the answer to the world surplus of CPU cycles.
> 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.
> It only works with static libraries. It doesn't work with shared
> libraries. To work with shared libraries, weak symbols should be used
> instead.
You have not told us about any specific problem or given us any reason to
believe there is in fact a problem. If you want anyone to do anything
about the bugs you claim to find, then you have to show us the bugs. It is
ridiculous that you have not learned this by now, HJ. One day the rest of
us may stop donating to you the substantial time and effort required to
extract the information you are so reticent to share.