Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2000 09:20:57 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Peter Wemm <peter@netplex.com.au>
Cc:        Doug Rabson <dfr@nlsystems.com>, Josef Karthauser <joe@pavilion.net>, "Matthew N. Dodd" <winter@jurai.net>, "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, Mike Smith <msmith@FreeBSD.ORG>, "Andrey A. Chernov" <ache@FreeBSD.ORG>, 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>
In-Reply-To: <20000607225858.59FCE1CE1@overcee.netplex.com.au>; from peter@netplex.com.au on Wed, Jun 07, 2000 at 03:58:58PM -0700
References:  <dfr@nlsystems.com> <20000607225858.59FCE1CE1@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <cracauer@cons.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000608092057.A53322>