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 1POep3-00009l-GD for garchives@archives.gentoo.org; Fri, 03 Dec 2010 23:13:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AB862E0C90 for ; Fri, 3 Dec 2010 23:13:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C410EE0C85 for ; Fri, 3 Dec 2010 22:40:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 497D21B4069 for ; Fri, 3 Dec 2010 22:40:16 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 required=5.5 tests=[AWL=0.078, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8xfpaS0J+sdm for ; Fri, 3 Dec 2010 22:40:10 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id EEE4C1B4013 for ; Fri, 3 Dec 2010 22:40:06 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1POeIO-0001Ho-Mz for gentoo-user@gentoo.org; Fri, 03 Dec 2010 23:40:04 +0100 Received: from dsl.comtrol.com ([64.122.56.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Dec 2010 23:40:04 +0100 Received: from grant.b.edwards by dsl.comtrol.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Dec 2010 23:40:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: How to build a static application binary? Date: Fri, 3 Dec 2010 22:37:09 +0000 (UTC) Message-ID: References: <20101203170030.6d325be8@karnak.local> 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: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dsl.comtrol.com User-Agent: slrn/pre0.9.9-102 (Linux) X-Archives-Salt: b3156e6b-fba4-4d9a-83f5-6481786485d2 X-Archives-Hash: 99302c4d60e4023fe337d092d1f16eca 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. :/ -- Grant Edwards grant.b.edwards Yow! SHHHH!! I hear SIX at TATTOOED TRUCK-DRIVERS gmail.com tossing ENGINE BLOCKS into empty OIL DRUMS ...