From owner-freebsd-current@FreeBSD.ORG Tue Nov 25 00:18:24 2003 Return-Path: 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 661F816A4CE for ; Tue, 25 Nov 2003 00:18:24 -0800 (PST) Received: from server.vk2pj.dyndns.org (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF98843FE0 for ; Tue, 25 Nov 2003 00:18:20 -0800 (PST) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])hAP8IJJD077469; Tue, 25 Nov 2003 19:18:20 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.12.9p1/8.12.9/Submit) id hAP8IIcL077468; Tue, 25 Nov 2003 19:18:18 +1100 (EST) (envelope-from peter) Date: Tue, 25 Nov 2003 19:18:18 +1100 From: Peter Jeremy To: "E.B. Dreger" Message-ID: <20031125081818.GD76478@server.vk2pj.dyndns.org> References: <20031125025621.453732A8FC@canning.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org Subject: Re: 40% slowdown with dynamic /bin/sh X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2003 08:18:24 -0000 On Tue, Nov 25, 2003 at 04:54:41AM +0000, E.B. Dreger wrote: >What specific aspects of rtld are required to support NSS in >static binaries? dlopen(), fixups, and dlsym()? All of the above. The underlying problem is how to handle a library call from within the NSS/PAM/whatever shared library. This has been discussed in one of the recent threads but it boils down to: 1) Static executables don't normally have any symbols available at runtime so it's difficult for a shared library to resolve symbols using definitions in the executable. 2) It is possible (likely?) that a shared library may reference a symbol that does not exist within the executable. 3) Loading libc.so etc to resolve a symbol means that there may be two distinct (and possibly different) instances of the same object associated with a process. This may create problems where those objects have side-effects. Peter