From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2059 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: TLS (thread-local storage) support Date: Sat, 6 Oct 2012 16:33:01 +0200 Message-ID: <20121006143300.GE24157@port70.net> References: <20121004211332.GA12874@brightrain.aerifal.cx> <20121005030414.GM254@brightrain.aerifal.cx> <20121005172729.GN254@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" X-Trace: ger.gmane.org 1349533994 24960 80.91.229.3 (6 Oct 2012 14:33:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2012 14:33:14 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2060-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 06 16:33:19 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 1TKVRO-0004SU-Tj for gllmg-musl@plane.gmane.org; Sat, 06 Oct 2012 16:33:19 +0200 Original-Received: (qmail 25720 invoked by uid 550); 6 Oct 2012 14:33:13 -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 25688 invoked from network); 6 Oct 2012 14:33:12 -0000 Content-Disposition: inline In-Reply-To: <20121005172729.GN254@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2059 Archived-At: --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Rich Felker [2012-10-05 13:27:29 -0400]: > On Thu, Oct 04, 2012 at 11:04:14PM -0400, Rich Felker wrote: > > Scratch that. It's now supported everywhere except dynamically loaded > > (dlopen'd) shared libraries. And I'm working on adding support for > > And they're working now too. > should the attached code work with dlopen when compiled as a dso? (i wanted to check if the alignments are ok after a dlopen, but i can see how this usage may not be supported) it seems it dies here in the ctor --rwEMma7ioTxnRzrJ Content-Type: text/x-csrc; charset=us-ascii Content-Disposition: attachment; filename="tls.c" #include __thread char c1 = 1; __thread char xchar = 2; __thread char c2 = 3; __thread short xshort = 4; __thread char c3 = 5; __thread int xint = 6; __thread char c4 = 7; __thread long long xllong = 8; struct { char *name; size_t size; size_t align; size_t addr; } t[4]; #define entry(i,x) \ t[i].name = #x; \ t[i].size = sizeof x; \ t[i].align = __alignof__(x); \ t[i].addr = (size_t)&x; __attribute__((constructor)) static void init(void) { entry(0, xchar) entry(1, xshort) entry(2, xint) entry(3, xllong) } --rwEMma7ioTxnRzrJ--