TLS, Thread Local Storage..

Marcel Moolenaar marcel at xcllnt.net
Wed Feb 25 09:46:05 PST 2004


On Wed, Feb 25, 2004 at 12:17:47AM -0800, Julian Elischer wrote:
> > 
> Who can tell me how well our linker understands what gcc puts out when
> given a __thread directive..

We need a binutils update anyway. The assembler doesn't understand
the output of the compiler on most platforms anyway. See also:
	http://people.freebsd.org/~marcel/tls.html

It says that only ia64 has full GNU toolchain support (which is
unsurprising).

> The BIG question is "who knows enough about the dynamic linker to be
> able to make this work for dynamic libraries..?" I gather that our
> dynamic linker is not the one that linux uses and is specific to us. (Am
> I wrong?)

No, you're correct. There's a big part for the dynamic linker to
make it all work.

The hard part for me now is how to distribute the related features
across kernel, rtld, libc and the various threading libraries to make
it work in all cases (ie complete vs shared, static vs dynamic and
threaded vs non-threaded) and without pessimizing non-TLS binaries.

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel at xcllnt.net


More information about the freebsd-current mailing list