Subject: Re: RelCache (aka ELF prebinding) news
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Bang Jun-Young <junyoung@netbsd.org>
List: tech-kern
Date: 12/04/2002 03:31:52
On Tue, Dec 03, 2002 at 10:19:06AM -0800, Jason R Thorpe wrote:
> On Tue, Dec 03, 2002 at 12:14:19PM -0500, Thor Lancelot Simon wrote:
> 
>  > You should use the length and the filename, no matter what.  I'd call
>  > that "metadata", but maybe you wouldn't. :-)  You don't need to include
>  > them in the checksum, just use them as separate data to match the cache
>  > entry against.  That is basically without cost and makes a collision
>  > even less likely, as collisions against data of different lengths are
>  > excluded.  And you can still move the file around and not rebind so
>  > long as you move it back.
> 
> Actually, checksumming a library feels ... Wrong to me.

No, checksum (actually two) is only used as identifier. Identification is
as simple as comparing two 64 bit integer values (or 16 byte strings with
the current implemetation).

Jun-Young

-- 
Bang Jun-Young <junyoung@netbsd.org>