From owner-freebsd-hackers Sat Jan 6 06:37:29 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA26142 for hackers-outgoing; Sat, 6 Jan 1996 06:37:29 -0800 (PST) Received: from expo.x.org (expo.x.org [198.112.45.11]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA26137 for ; Sat, 6 Jan 1996 06:37:26 -0800 (PST) Received: from cambridge.x.org by expo.x.org id AA10005; Sat, 6 Jan 96 09:36:54 -0500 Received: by cambridge.x.org id AA06441; Sat, 6 Jan 1996 09:36:46 -0500 Message-Id: <9601061436.AA06441@cambridge.x.org> To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Cc: hackers@freefall.FreeBSD.org Subject: Re: Demand loading (Re: FreeBSD, Zappa & PCI) In-Reply-To: Your message of Sat, 06 Jan 1996 14:35:17 +0100. <199601061335.OAA13639@uriah.heep.sax.de> Organization: X Consortium Date: Sat, 06 Jan 1996 09:36:46 EST From: "Kaleb S. KEITHLEY" Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > As Kaleb S. KEITHLEY wrote: > > > > > > I'd also be keen to get rid of ldconfig > > and ld.so.cache. > > Why? > > I've been missing them on SysV. (For configuration purposes, let the > possible performance gain from a shorter lookup time alone.) > In SVR4 (or Digital Unix nee OSF/1) you set the RPATH in the executable to dictate where to look for shared libs if the shared libs aren't in the "usual" place; completely obviating the need for ldconfig and ld.so.cache. Packages put the libraries where ever they want, the program knows where to find them. You don't need hints like ldconfig and ld.so.cache. This is good for at least two reasons. 1) The run-time loader doesn't have to search for libraries in every directory in the ld.so.cache, only in the directories the application thinks it should look in. I don't know how much of a performance impact this is in reality, but in theory it could be a sizable performance hit if the system has lots of different packages with libraries in lots of different places. 2) suid root programs know exactly where to get the shared libs they want, closing a sizable security hole. And if the application doesn't have the RPATH recorded in the executable, then you use the LD_LIBRARY_PATH to tell it where to look. I don't remember what SYSV did, but who's really running SYSV anymore. Most current SYSV, e.g. SCO and HPUX, have moved a lot closer to SVR4 than they advertise. Even IBM/AIX's ECOFF format has RPATH. -- Kaleb KEITHLEY