dlclose and TLS
Steven Munroe
sjmunroe@us.ibm.com
Tue Apr 29 00:07:00 GMT 2003
Ulrich Drepper writes:
> I've checked in some code to fix dlclose of modules with static TLS
> for TLS_TCB_AT_TP platforms. The existing code was completely broken
> but I thnk it should more or less work for TLS_DTV_AT_TP platforms.
As of this morning ppc and ppc64 linuxthreads are working but nplt is
not. At the moment nptl-0.36 is out sync with glibc at cvs head.
The problem I fould was that (at glibc cvs head) TLS_TCB_SIZE (defined
as 0) was removed from the TLS_TPREL_VALUE calculation (in
sysdeps/powerpc/dl-tls.h). To compensate the size of tcbhead_t was
rolled into TLS_PRE_TCB_SIZE (in linuxthreads/sysdeps/powerpc/tls.h).
Also dtv addressing was changed to use (TCBP)[-1].dtv.
The nptl sysdeps/powerpc/tls.h is still using the old definition
(TLS_PRE_TCB_SIZE does not include sizeof(tcbhead_t)) so all TPREL
relocations are off by sizeof(tcbhead_t).
Unfortunately my attemps so far (by either changing powerpc/dl-tls.h
(add TLS_TCB_SIZE back) or nptl's powerpc/tls.h (make it look like
linuxthreads powerpc/tls.h) have successed in getting ppc32/64 nptl
working. There seems to be dependences in glibc for TLS_TCB_SIZE to be 0
and in nptl-0.36 for it to be sizeof(tcbhead_t)
Is anyone else working on the corresponing nptl changes?
If not what are the generic glibc dependences on TLS_TCB_SIZE and
TLS_PRE_TCB_SIZE for TLS_DTV_AT_TP platforms?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nptl-tls-glibc-0428.patch
URL: <http://sourceware.org/pipermail/libc-hacker/attachments/20030429/304fd073/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc-dl-tls-20030428.patch
URL: <http://sourceware.org/pipermail/libc-hacker/attachments/20030429/304fd073/attachment-0001.ksh>
More information about the Libc-hacker
mailing list