Preliminary ELF prebinding patches available.

From: Matthew N. Dodd <mdodd_at_FreeBSD.ORG>
Date: Sun, 25 May 2003 06:32:38 -0400 (EDT)
I've implemented per-executable ELF prebinding:

	ftp://ftp.jurai.net/users/winter/patches/prebind.patch

Initial performance measurements are very encouraging.

I originally ported the work that Bang Jun-Young (junyoung_at_netbsd.org) did
for NetBSD (RelCache.  See ftp://ftp.netbsd.org/pub/NetBSD/misc/junyoung)
but found that there were too many problems to work around and that the
cache file size made it impractical.

This patch requires toolchain changes (included) to allow the linker to
add a 'BUILDID' section to each library and executable.  This section
allows the prebinding file to be validated.

There are only two assumptions this implementation makes:

	1.  The number of libraries does not change.
	2.  The order of libraries does not change.

(This means that the prebinding file will be invalidated if LD_PRELOAD is
used or if a new dependency is introduced via a shared library etc.)

Solving these will require further kernel support (similar to OS X in some
respects).

There are a few more changes I need to make, and documentation to write,
as well some testing and performance measurements.

I should also note that these changes are x86 only at this point.

Comments welcome.

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| winter_at_jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
| http://www.jurai.net/~winter |  For Great Justice!  | ISO8802.5 4ever |
Received on Sun May 25 2003 - 01:32:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:09 UTC