Preliminary ELF prebinding patches available.
Matthew N. Dodd
mdodd at FreeBSD.ORG
Sun May 25 03:32:40 PDT 2003
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 |
More information about the freebsd-current
mailing list