From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2774 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/3] Have different definitions of __pthread_tsd_main agree in size Date: Mon, 11 Feb 2013 12:22:37 +0100 Message-ID: <20130211112237.GB6181@port70.net> References: <1360535367.23424.466.camel@eris.loria.fr> <20130211003158.GP20323@brightrain.aerifal.cx> <1360568420.23424.521.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 1360581768 6471 80.91.229.3 (11 Feb 2013 11:22:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 11:22:48 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2775-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 11 12:23:09 2013 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 1U4rTY-0002SU-Ci for gllmg-musl@plane.gmane.org; Mon, 11 Feb 2013 12:23:08 +0100 Original-Received: (qmail 25960 invoked by uid 550); 11 Feb 2013 11:22:49 -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 25949 invoked from network); 11 Feb 2013 11:22:49 -0000 Content-Disposition: inline In-Reply-To: <1360568420.23424.521.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2774 Archived-At: * Jens Gustedt [2013-02-11 08:40:20 +0100]: > Am Sonntag, den 10.02.2013, 19:31 -0500 schrieb Rich Felker: > > Nope, that defeats the whole purpose, which is to avoid wasting space > > when it's not needed. This warning is bogus. There's no reason a weak > > symbol can't have different size than a strong one that optionally > > replaces it. > > Hm, about wasting space I am not very convinced, but maybe I didn't > understand well enough why you need all these aliases after all, and > why you can't refer to the real symbol directly. > aliases are there for a reason > In any case, this is perhaps better done with the tool chain. I have > good experience by having > > -fdata-sections -ffunction-sections > > for the compiler options and then > > -Wl, --gc-sections > > for the link. In the case of musl, this removes exactly all the dummy > sections :) plus two others (pad and sccp), see below. > are you sure about the correctness of these? they seem to be broken to me: weak aliases are not respected and functions are dropped even if there are weak references to them which is bad.. eg if sccp is dropped then in any code that does not use pthread, the cancellable syscalls will be broken (if i understand these right)