From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5700 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: reserved symbol violations Date: Sat, 2 Aug 2014 12:37:43 -0400 Message-ID: <20140802163743.GS1674@brightrain.aerifal.cx> References: <1406996883.8274.181.camel@eris.loria.fr> 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 1406997486 5412 80.91.229.3 (2 Aug 2014 16:38:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2014 16:38:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5705-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 02 18:37:58 2014 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 1XDcJh-0005Lr-9J for gllmg-musl@plane.gmane.org; Sat, 02 Aug 2014 18:37:57 +0200 Original-Received: (qmail 30238 invoked by uid 550); 2 Aug 2014 16:37:56 -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 30227 invoked from network); 2 Aug 2014 16:37:55 -0000 Content-Disposition: inline In-Reply-To: <1406996883.8274.181.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5700 Archived-At: On Sat, Aug 02, 2014 at 06:28:03PM +0200, Jens Gustedt wrote: > Hi, > by digging into the symbols that are dragged into a C11 thread > executable I noticed that there are some hotspots that should perhaps > be worth looking at. I attach a file that summarizes the findings. > > One is simple, I'd change the reference to clock_gettime in > __timedwait to __clock_gettime. That's fine. > One looks weird, though, lock_ptc.o It is only linked (via __synccall) > if setrlimit or setxid are. But then it drags a whole bunch of pthread > symbols in, which looks wrong to me. Also I think that this doesn't > really capture the need, because the code is only active if both > setrlimit *and* pthread_create are *used*. > > So in the absence of either of it, __syncall shouldn't be linked. But > I wouldn't know how to achieve this with weak symbols, I have to > admit. I have no idea how to make it get linked only if both are used, and I suspect it's impossible. However, there's no namespace violation here; setrlimit and set*id are from POSIX, not ISO C. So it's just excess bloat. Rich