[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TLS support on NetBSD
From: |
Ludovic Courtès |
Subject: |
Re: TLS support on NetBSD |
Date: |
Thu, 29 Oct 2009 23:24:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hey,
Ken Raeburn <address@hidden> writes:
> 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.
> but the kernel or library or whatever doesn't seem to have set it up
> properly. So it compiles and links just fine for me, but crashes when
> running.
Hmm, not good.
> I think the autoconf test is thus going to have to run a test program
> to see if __thread is supported, which means it won't be friendly to
> cross-compilation setups. (I still don't have all the dependencies
> built for NetBSD, so no working patch.) Or, we could hard-code
> knowledge about systems where compiling and linking work but execution
> fails; that's generally frowned upon....
Yeah, that doesn’t sound very good.
Thanks,
Ludo’.