From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1375 Path: news.gmane.org!not-for-mail From: Luca Barbato Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 9/10] GLIBC ABI patches Date: Thu, 26 Jul 2012 00:19:27 +0200 Message-ID: <501070EF.5000003@gentoo.org> References: <11675.132.241.65.164.1343185254.squirrel@lavabit.com> <20120725150658.GP544@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343254787 12655 80.91.229.3 (25 Jul 2012 22:19:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 22:19:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1376-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 26 00:19:47 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 1Su9vi-0005y2-8F for gllmg-musl@plane.gmane.org; Thu, 26 Jul 2012 00:19:42 +0200 Original-Received: (qmail 30509 invoked by uid 550); 25 Jul 2012 22:19:41 -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 30501 invoked from network); 25 Jul 2012 22:19:41 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120529 Thunderbird/12.0.1 In-Reply-To: <20120725150658.GP544@brightrain.aerifal.cx> X-Enigmail-Version: 1.5pre Xref: news.gmane.org gmane.linux.lib.musl.general:1375 Archived-At: On 07/25/2012 05:06 PM, Rich Felker wrote: > On Tue, Jul 24, 2012 at 11:00:54PM -0400, idunham@lavabit.com wrote: >> Rich: >> I have three questions: >> >> 1. Should it be possible to weak_alias an externally defined function? >> ie, src/stdlib/strtod.c defines strtod, then src/glibc-abi/stdlib.c goes: >> #include "libc.h" >> #include >> weak_alias(strtod, __strtod_internal) > > This is not possible the way traditional assemblers/linkers work. You > can make a wrapper function but that adds bloat and has a runtime > performance cost if the wrapper is used. The only way I can see to keep them apart of the code is moving them in an header and conditionally include them when compatibility is enabled at builtime. Not sure if it would worth it. >> 3. Would a subdirectory of src/ solely for glibc ABI/API compatability be >> appropriate? >> The point would be to allow removing gnuish extensions without too much >> trouble. >> Even if 1 or 2 mean that weak_alias stuff goes in the same file, this >> could contain functions like the ones added for gnulib (src/stdio/ext*.c). > > I think that's confusing matters. The ones added for gnulib are not > for glibc compatibility; glibc does not even have them. They're added > so that gnulib will not attempt to poke at musl internals and generate > musl-version-specific binaries which would crash on different musl > versions. Removing them is a very bad idea. Moreover on i386 they're > 55 bytes of code. Removing something like that for space savings is on > the same order of ridiculousness as some of busybox's optimizations... And probably leaving a note for the poor soul really needing to shave those last 55/100 bytes would be enough. lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero