From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2056 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: TLS (thread-local storage) support Date: Thu, 4 Oct 2012 23:04:14 -0400 Message-ID: <20121005030414.GM254@brightrain.aerifal.cx> References: <20121004211332.GA12874@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1349406780 25485 80.91.229.3 (5 Oct 2012 03:13:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2012 03:13:00 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2057-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 05 05:13:02 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TJyLW-00079Z-1T for gllmg-musl@plane.gmane.org; Fri, 05 Oct 2012 05:13:02 +0200 Original-Received: (qmail 18377 invoked by uid 550); 5 Oct 2012 03:12:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 18369 invoked from network); 5 Oct 2012 03:12:55 -0000 Content-Disposition: inline In-Reply-To: <20121004211332.GA12874@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2056 Archived-At: On Thu, Oct 04, 2012 at 05:13:32PM -0400, Rich Felker wrote: > Hi, > > I've committed the initial version of thread-local storage > (__thread/_Thread_local keyword). So far, it only works in > static-linked applications, Scratch that. It's now supported everywhere except dynamically loaded (dlopen'd) shared libraries. And I'm working on adding support for them too. So far only i386 is tested, but at least x86_64 is also very likely to work (it's basically the same). > and might or might not be working properly > on arm, mips, and microblaze. I believe it's working on ARM, but it's completely untested. Microblaze and MIPS do not yet have the necessary relocation processing, but TLS in the main executable (static or dynamic linked) _might_ work. > The latter is a matter of whether these > archs need "TLS variant I" instead of the much cleaner/saner "variant > II" used by i386 and x86_64; So far, I can't see anywhere the variant is relevant to the ABI; it seems we can just use "variant II" unconditionally. Let's hope I'm right because I don't feel like dealing with more ugly, gratuitous special-case code. Rich