From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1POfcQ-0005zX-72 for garchives@archives.gentoo.org; Sat, 04 Dec 2010 00:04:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9D9AE0B9A for ; Sat, 4 Dec 2010 00:04:49 +0000 (UTC) Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53]) by pigeon.gentoo.org (Postfix) with ESMTP id B5FE8E06E7 for ; Fri, 3 Dec 2010 23:33:57 +0000 (UTC) Received: by wwi18 with SMTP id 18so4242007wwi.10 for ; Fri, 03 Dec 2010 15:33:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:x-kmail-markup:mime-version :content-type:content-transfer-encoding:message-id; bh=UpxjxlOmePHsx72TcchZYlWTH7z7DY6drzWbczlcmxE=; b=iQH7DxjgSbDsefso+hnk0dhfXP8+1X+AjwDZ6Vch7F1W+Tl1KcD/5HsBFLBmNqb+NL xPQmrUUxixdZtpqZQCegFTB7Peuk4C2PCOWWzkLFAGEHB+CGpZzBGWcChJOaS+0wCzf/ YGa69Y2vFIm9/7unoX7JugUTLVxS9n/I7cvtc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to :x-kmail-markup:mime-version:content-type:content-transfer-encoding :message-id; b=Hk8Nt6BiMscGvOPj/YcXd3Apv72T/hvuyp8AlEAbr14NfYmqnGhcSkG74qu9VUrBtl YmXbECCyMV8w4DSzelQJKmqUlDfGgJzLtpdpn3S5yot1DW2Sr0tiqOzoE5J9xmA1HFmi 3Wq2nGatn1iZIZdFoZNZihWmPL1wpjukZMUnw= Received: by 10.216.93.9 with SMTP id k9mr2200737wef.89.1291419236731; Fri, 03 Dec 2010 15:33:56 -0800 (PST) Received: from nazgul.localnet (196-210-202-193.dynamic.isadsl.co.za [196.210.202.193]) by mx.google.com with ESMTPS id x12sm1167231weq.42.2010.12.03.15.33.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Dec 2010 15:33:55 -0800 (PST) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: How to build a static application binary? Date: Sat, 4 Dec 2010 01:34:24 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.36-ck-r3; KDE/4.5.4; x86_64; ; ) References: <20101203170030.6d325be8@karnak.local> In-Reply-To: X-KMail-Markup: true Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_A6X+MZnGn7yKVe7" Content-Transfer-Encoding: 7bit Message-Id: <201012040134.24730.alan.mckinnon@gmail.com> X-Archives-Salt: 92f5f1f0-9da9-4169-b919-6bc7d44b422d X-Archives-Hash: 566ae6eba23e693ff5bc7cdccbb3401f --Boundary-01=_A6X+MZnGn7yKVe7 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Apparently, though unproven, at 00:37 on Saturday 04 December 2010, Grant Edwards did opine thusly: > On 2010-12-03, David W Noon wrote: > > What you are seeing is a lot of glibc routines being included by the > > linkage editor. These handle all sorts of conditions that will > > likely never occur in your program. > > > > Try using a smaller C library, like uclibc or klibc. They might not > > work as well, but they will give you a smaller executable. > > > > Alternatively, try rewriting your code in assembler. > > For various reasons (which I doubt anybody cares about), gritting my > teeth and living with the 520K per application looks like a more > practical solution that either using assembler or a different libc. > > In practice, I'm sure nobody but me will ever even notice (or care > even if they did notice) the wasted 2MB on a 25MB liveCD. But it will > still bug me. :/ That's 8% of your space resources. Many more than just you will notice and care and whinge loudly. Probably including me. It might be worth the effort to switch to a libc designed for the sort of task you want to accomplish. I assume you already made the effort with busybox or similar, it's much the same viewpoint. -- alan dot mckinnon at gmail dot com --Boundary-01=_A6X+MZnGn7yKVe7 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit

Apparently, though unproven, at 00:37 on Saturday 04 December 2010, Grant Edwards did opine thusly:

> On 2010-12-03, David W Noon <dwnoon@ntlworld.com> wrote:

> > What you are seeing is a lot of glibc routines being included by the

> > linkage editor. These handle all sorts of conditions that will

> > likely never occur in your program.

> >

> > Try using a smaller C library, like uclibc or klibc. They might not

> > work as well, but they will give you a smaller executable.

> >

> > Alternatively, try rewriting your code in assembler.

>

> For various reasons (which I doubt anybody cares about), gritting my

> teeth and living with the 520K per application looks like a more

> practical solution that either using assembler or a different libc.

>

> In practice, I'm sure nobody but me will ever even notice (or care

> even if they did notice) the wasted 2MB on a 25MB liveCD. But it will

> still bug me. :/

That's 8% of your space resources. Many more than just you will notice and care and whinge loudly. Probably including me.

It might be worth the effort to switch to a libc designed for the sort of task you want to accomplish. I assume you already made the effort with busybox or similar, it's much the same viewpoint.

--

alan dot mckinnon at gmail dot com

--Boundary-01=_A6X+MZnGn7yKVe7--