Re: [RFA/RFC] thread local storage tests

Elena Zannoni
2003-02-08T04:35:20Z

Michael Elizabeth Chastain writes:
> http://www.shout.net/~mec/sunday/2003-02-07-tls/index.html
>
> These tests use '__thread' which is available with gcc gcc-3_3-branch
> and later. So if you want to work on the test themselves you need
> to grab a 3.3 or 3.4 compiler.
>
> They also have problems even with those compilers.
>
> Michael C

thanks, this is really useful.

Hmm, I suspected that. I was able to get them to run in the current
Redhat rawhide.

What glibc(s) were you using? It may also be due to slightly versions
of binutils, even though, you are also using HEAD binutils, and it
should work there.

I don't know whether stabs has support for TLS, I doubt it. In
dwarf2, if you use readelf -w, you should see, for the thread local
variables, a DW_OP_GNU_tls_push_address, in the debug info.

I ran into a compiler version that compiled the file happily, but
didn't produce the right information, It was marking the variale as a
regular static one.

On my system it refuses to compile it, I get the 2 unsupported
tests. At least something matches. :-(

Do you have the gdb.logs for the cases that almost work?

Elena