From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2137 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: TLS (thread-local storage) support Date: Wed, 17 Oct 2012 12:37:33 +0200 Message-ID: <20121017103733.GP24157@port70.net> References: <20121004211332.GA12874@brightrain.aerifal.cx> <20121004223631.GL254@brightrain.aerifal.cx> <20121016220922.GO24157@port70.net> 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 1350470269 27684 80.91.229.3 (17 Oct 2012 10:37:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Oct 2012 10:37:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2138-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 17 12:37:56 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 1TOR0c-0007Px-AW for gllmg-musl@plane.gmane.org; Wed, 17 Oct 2012 12:37:54 +0200 Original-Received: (qmail 16212 invoked by uid 550); 17 Oct 2012 10:37:46 -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 16196 invoked from network); 17 Oct 2012 10:37:45 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2137 Archived-At: * boris brezillon [2012-10-17 01:16:43 +0200]: > > most functions in musl may be run before pthread_self_init > > (it runs on demand when a pthread function is used) > This can be done during dynamic linking process (by checking the split > stack note). i meant that you would need to annotate almost all musl functions as no_split_stack because normally thread pointer is not initialized (but dalias commented that this might change) the dynamic loader can only do the initialization for dynamically linked executables so it's easier to just not compile musl with -fsplit-stack musl can easily give guarantees about its maximum stack usage assuming there is a bound to function call overhead and alignment overhead of auto variables etc (but dalias already gave better explanation)