From owner-cvs-all Thu Jun 8 0:21:37 2000 Delivered-To: cvs-all@freebsd.org Received: from gilgamesch.bik-gmbh.de (T1-Hansenet.BIK-GmbH.de [192.76.134.246]) by hub.freebsd.org (Postfix) with ESMTP id 326AC37B9E1; Thu, 8 Jun 2000 00:21:27 -0700 (PDT) (envelope-from cracauer@gilgamesch.bik-gmbh.de) Received: (from cracauer@localhost) by gilgamesch.bik-gmbh.de (8.9.3/8.7.3) id JAA94175; Thu, 8 Jun 2000 09:20:57 +0200 (MET DST) Date: Thu, 8 Jun 2000 09:20:57 +0200 From: Martin Cracauer To: Peter Wemm Cc: Doug Rabson , Josef Karthauser , "Matthew N. Dodd" , "Jordan K. Hubbard" , Mike Smith , "Andrey A. Chernov" , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: static binaries (was Re: cvs commit: src/bin/ls extern.h ls.1 ls.c ls.h print.c ) Message-ID: <20000608092057.A53322@cons.org> References: <20000607225858.59FCE1CE1@overcee.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000607225858.59FCE1CE1@overcee.netplex.com.au>; from peter@netplex.com.au on Wed, Jun 07, 2000 at 03:58:58PM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <20000607225858.59FCE1CE1@overcee.netplex.com.au>, Peter Wemm wrote: > I still believe we should have /lib/libc.so.4, /lib/ld-elf.so.1 and all > of / dynamically linked. Note that even /bin/sh needs to be dynamic in > order to have ~user to work in a nsswitch.conf style scheme. The performance loss of a dynamically linked shell is considerable. However, the performance loss only applies when there actually are libs dynamically linked in. If you link as a dynamic binary (that means it includes and cal use dlopen()'n'stuff), but link in all normal libraries static, the performance is not worse than for a static binary. Please see the appended benchmark. Generally, I think that dynamic loading of code fragments is a very powerful and efficient concept (well, I'm coming from Lisp...) and that it is underused (in favour of home-grown logic interpreters and whatnot). > Yes, I know that there are other ways to do this, but I wonder if we are > getting to the point where we're approaching the point that having / static > is more trouble than it's worth. There is nothing stopping us having a > couple of key /static/sh style binaries on the offchance that somebody needs > to move /lib/libc.so.4.old back to lib/libc.so.4 and cannot boot a fixit > floppy or CD or PXE boot. The static sh could also be compiled with other options, like readline out, test(1), ls(1) and grep(1) in and such. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message