On Oct 29, 2009, at 18:24, Ludovic Courtès wrote:
I just took a little bit of a look... on my NetBSD 5.0.1 x86 system,
the __thread support simply uses the %gs segment register,

That’s weird because it should only do such things with the
‘initial-exec’ or ‘local-exec’ thread models; otherwise, it relies on
support from the C library at run-time, something called
‘__tls_get addr ()’ in glibc.

I was compiling an application, not a library file; I'm not sure if that makes a difference. It might, now that I think about it. (...type type type...) Ah, yes. If I add -fPIC, it generates a call to __tls_get_addr. But the test code in the configure script is compiled as a program, not as a library module, so it wouldn't get the link error.

Looks like the NetBSD folks have been seeing this problem for at least 2.5 years, too, since before the last major release, and apparently haven't addressed it: http://mail-index.netbsd.org/tech-toolchain/2007/04/25/0000.html .

Ken

Reply via email to