Hi,
Using the __thread attribute does not seem to work under debian amd64:
<<<<<<<<<<<<
static __thread int foo;
void bar ()
{
foo = 5;
}
<<<<<<<<<<<<
$> gcc -fPIC --shared -o foo.so foo.c
$> gcc -o foo foo.so
foo.so: undefined reference to `__tls_get_addr'
I'm using gcc-3.4 and libc6 2.3.2.ds1-15. I think the amd64 version of
libc6 is not
compiled with the proper TLS support. The above code works on ia32, and on
the amd64 version of Suse 9.1.
Zoltan