From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1370 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 9/10] GLIBC ABI patches Date: Wed, 25 Jul 2012 11:06:58 -0400 Message-ID: <20120725150658.GP544@brightrain.aerifal.cx> References: <11675.132.241.65.164.1343185254.squirrel@lavabit.com> 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: dough.gmane.org 1343228843 25948 80.91.229.3 (25 Jul 2012 15:07:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 15:07:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1371-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 25 17:07:23 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 1Su3BE-00018s-JA for gllmg-musl@plane.gmane.org; Wed, 25 Jul 2012 17:07:16 +0200 Original-Received: (qmail 9643 invoked by uid 550); 25 Jul 2012 15:07:15 -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 9635 invoked from network); 25 Jul 2012 15:07:15 -0000 Content-Disposition: inline In-Reply-To: <11675.132.241.65.164.1343185254.squirrel@lavabit.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1370 Archived-At: 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. > 2. Would this result in obfustication of the source? I'm not sure. > 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... Rich