From owner-freebsd-current Thu Oct 31 10:55: 1 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCC7837B401 for ; Thu, 31 Oct 2002 10:54:58 -0800 (PST) Received: from clover.kientzle.com (user-112uh9a.biz.mindspring.com [66.47.69.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0B0443E88 for ; Thu, 31 Oct 2002 10:54:57 -0800 (PST) (envelope-from kientzle@acm.org) Received: from acm.org (c43 [66.47.69.43]) by clover.kientzle.com (8.11.3/8.11.3) with ESMTP id g9VIsuE12917 for ; Thu, 31 Oct 2002 10:54:56 -0800 (PST) (envelope-from kientzle@acm.org) Message-ID: <3DC17C7F.9020308@acm.org> Date: Thu, 31 Oct 2002 10:54:55 -0800 From: Tim Kientzle Reply-To: kientzle@acm.org User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: current@FreeBSD.ORG Subject: Re: libc size Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I agree with David Schultz that dynamically linking /bin and /sbin is playing with fire. I, too, have had ugly experiences on systems that did this: When /usr won't mount, it is not pleasant to be stuck with no tools. (Consider a network environment where /usr is NFS-mounted as an extreme example.) As for the disk space concerns, I spent a couple of hours with some of the smaller utilities. Identical functionality to the originals, still statically linked. Compare with 'ls -l /bin' on your system: * echo: 3k * sleep: 3k * sync: 3k * cat: 40k with setlocale, 12k without (cat uses setlocale for non-standard -v option) Total savings: over 150k just from these four. This is under 4.x, though; last I checked, -CURRENT still had some ugly bloat in crt. (crt requires atexit, which requires malloc, ugh. Maybe this has been fixed?) Easily-commitable details on request. As for the resolver issue, maybe there's another way to separate the resolver? For example, a simple command-line resolver utility (something like a stripped-down 'dig') could be invoked. That would leave one utility with the resolver libs statically-linked, and remove it from many other places. There's an obvious performance hit, but resolving is a fairly high-overhead operation in any case. Alternatively, some sort of simple resolver daemon could be implemented. The BIND folks are already moving in this direction because of IP6 resolver bloat, I understand. Either approach would shed resolver bloat from a lot of places without the headaches of dynamic linking. Tim Kientzle To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message