From owner-freebsd-current@FreeBSD.ORG Fri Nov 28 02:17:03 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 D095216A4CE for ; Fri, 28 Nov 2003 02:17:03 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 235FE43F93 for ; Fri, 28 Nov 2003 02:17:02 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) hASAGnv0043186; Fri, 28 Nov 2003 10:16:50 GMT (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Peter Jeremy In-Reply-To: <20031128075911.GB23322@server.vk2pj.dyndns.org> References: <3FC60848.5030908@catpa.com> <20031128075911.GB23322@server.vk2pj.dyndns.org> Content-Type: text/plain Message-Id: <1070014609.42990.1.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 28 Nov 2003 10:16:49 +0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on herring.nlsystems.com cc: freebsd-current@freebsd.org Subject: Re: Apples linking 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: Fri, 28 Nov 2003 10:17:03 -0000 On Fri, 2003-11-28 at 07:59, Peter Jeremy wrote: > On Thu, Nov 27, 2003 at 11:24:23AM -0500, Robert Watson wrote: > [Darwin pre-binding] > >presumably applies to other processor architectures. The one thing that > >turns me off to this scheme is that I'd like it if we could find a way to > >represent this using solely existing BSD/UNIX kernel primitives (mmap, et > >al) and userspace, rather than adding special-purpose system calls that > >complicated various code paths, and that aren't portable. > > Compaq/HP Tru64 supports link-time pre-binding, called "Quickstart". > To use it, shared libraries are linked to load at mutually exclusive > addresses and applications are linked assuming the preferred .so load > addresses. At run-time, the rtld verifies that it can map every > shared library at its preferred address and that each shared library > is the same one the application was linked against (using checksums in > the COFF headers). If all this is true, all the relocations are > correct and execution starts immediately. If any checks fail, rtld > falls back to the traditional check-every-symbol-and-relocation > approach. > > The benefit is very fast start times - not much more overhead than > starting a static executable. This is approximately what happens on Win32 too. When developing DLLs for windows, I tend to manually pick a load address at link time. This is messy but it helps load time a lot for large projects.