Subject: Re: RelCache (aka ELF prebinding) news
To: Havard Eidnes <he@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-userlevel
Date: 12/01/2002 15:23:51
On Sun, Dec 01, 2002 at 09:09:24PM +0100, Havard Eidnes wrote:
> > > I don't think the computation of the checksum is done on program load by
> > > ld.elf_so, but rather only when setting up a program for prebinding. I
> > > understood that the checksums are saved in the new special sections in
> > > the executable and libraries when the prebinding is set up. I may have
> > > misunderstood, though.
> >
> > How can you know whether the checksum matches or not if you don't compute
> > it again?
>
> To quote Bang Jun-Young:
>
> > The next time the same binary is executed, ld.elf_so checks if there are
> > modifications in objects by comparing md5 checksum, starting address, etc.,
> > and if not, it reads a RelCache file and mmaps (overlays) it on the
> > appropriate memory region.
>
> I.e. if the executable doesn't have the md5 checksum set in the md5
> section (newly installed, not yet prebound), the executable has been
> modified since it was prebound (again, newly installed), and probably
> others ("etc." above), it does not match.
In that case, what is the point of using an MD5 checksum? A random number
of the same length would serve equally well.
--
Thor Lancelot Simon tls@rek.tjls.com
But as he knew no bad language, he had called him all the names of common
objects that he could think of, and had screamed: "You lamp! You towel! You
plate!" and so on. --Sigmund Freud