Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 2004 15:53:51 +0100
From:      Doug Rabson <dfr@nlsystems.com>
To:        David Xu <davidxu@freebsd.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Pthread patches for TLS
Message-ID:  <200408051553.51692.dfr@nlsystems.com>
In-Reply-To: <411248DA.3080607@freebsd.org>
References:  <200408050940.36506.dfr@nlsystems.com> <411248DA.3080607@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I haven't tried to support static linked TLS at all. The plan is to get 
the kernel to size the TLS segment and add extra AUXARGs to report its 
size, initialiser location and alignment. The stubs in libc/gen/tls.c 
would be extended to provide support for allocating the TLS blocks in 
the static case.

I was under the impression that no-one particularly wanted to support 
pthreads in statically linked binaries?


On Thursday 05 August 2004 15:48, David Xu wrote:
> This patch does not work for statically linked binary even if the
> binary does
> not use __thread, I think you still need to use malloc to allocate
> memory for tcb if it is being compiled as a static library.
> I have tested it on AMD64, dynamically linked binary works fine.
>
> David Xu
>
> Doug Rabson wrote:
> >This is the current state of my patches to add TLS support to
> > libpthread and libthr. I have added code for i386, amd64 and ia64
> > but I've only tested i386. I believe the code for amd64 is right. I
> > don't much like what I've done to the ia64 version though. I would
> > like to commit only the i386 version at this stage. The amd64 code
> > could be committed if someone tests it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408051553.51692.dfr>