Subject: Re: NetBSD ld.elf_so vs FreeBSD ld-elf.so vs Linux ld-linux.so
To: None <tech-userlevel@netbsd.org, tech-perform@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 09/26/2002 11:08:19
[ On Thursday, September 26, 2002 at 12:26:06 (GMT), Charles M. Hannum wrote: ]
> Subject: Re: NetBSD ld.elf_so vs FreeBSD ld-elf.so vs Linux ld-linux.so
>
> Oh, also...
> 
> Someone suggested the other day that RedHat uses `prelinking' by
> default, so that probably accounts for some difference in their
> performance.

In my research into true pre-linking or pre-binding the only OS I could
find which I remember to have had it working by default, and which was
even remotely freely available, was Darwin (with the other non-free OS
which seem to have pioneered this usage being Irix and BeOs).  The
starting reference for anything related to this stuff seems to always be:

	http://iecc.com/linker/linker10.html

Unfortunately Darwin uses a quite different object and executable format
than the *BSDs do.

Some more recent research was done by a SuSe person though:

	http://www.suse.de/~bastian/Export/linking.txt

Apparently a RedHat person, Jakub Jelinek, has indeed done at least a
preliminary implementation that works for at least i386.

I can't find anything related to pre-binding, pre-linking, or caching,
here yet:

	http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/

but it seems support for it will eventually be contributed back to GNU
Binutils so perhaps we'll get it yet! ;-)


Of course the other really huge win in Darwin's toolchain is their
ability to do locality of reference optimisation.  There are obviously
limits to how well it can be done for shared libraries, but still it
seems that the common cases help a lot, especially on any processor with
any decent sized instruction cache.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>