From owner-freebsd-current Wed Sep 2 08:46:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA09838 for freebsd-current-outgoing; Wed, 2 Sep 1998 08:46:57 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA09832 for ; Wed, 2 Sep 1998 08:46:55 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id IAA22605; Wed, 2 Sep 1998 08:45:46 -0700 (PDT) (envelope-from jdp) Message-Id: <199809021545.IAA22605@austin.polstra.com> To: Mike Smith cc: current@FreeBSD.ORG Subject: Re: E-day problems: rtld-elf dlsym() broken? In-reply-to: Your message of "Tue, 01 Sep 1998 21:46:29 -0000." <199809012146.VAA00555@word.smith.net.au> Date: Wed, 02 Sep 1998 08:45:46 -0700 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > If you dlopen a shared object that needs some additional libc > > functions, it won't be able to find them. > > That's OK, and under the circumstances we're talking about, not > actually likely to be a serious problem. The principal candidate > for this sort of activity is plugin modules, where you can generally > supply a very strict API to the plugin. But can you strictly define in advance which library functions the plug-in is allowed to call? That seems awfully risky. It would limit the possible plug-ins to what you can anticipate on day 0. Doesn't that defeat one of the main purposes of plug-ins, which is to allow expansion of functionality in ways unanticipated at the outset? What's the reason for not using dynamic linking? Is it space you're trying to save, or do you just want everything to be in one file, or is it something else? > I was actually referring to the process whereby you would create a > dynamically-linked program which contained static copies of its imports > from libc, ie. a more civlised version of: > > cc -nostdlib -o foobar foobar.o /usr/lib/libc.a Playing around with the existing ELF tools, I can't find any way to make a dynamic executable without linking in at least one shared library. I suppose the tools could be munged. Or, you could just link in a special tiny shared library to force dynamic linking. But as soon as you have a dynamically-linked program, then the program requires ld-elf.so.1, which means it's not stand-alone any more. > Consider the implications of this eg. in the context of PAM. My view is that dynamic linking and shared libraries are good things that should be used universally, except for the minimum set of recovery tools (cp, mv, and so forth), and possibly a few other programs where optimum performance is important. (-current readers, please drop me from the cc list of the interminable religious argument which will no doubt follow. I'll read all about it in the list. ;-) John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message