Re: Preliminary ELF prebinding patches available.

From: Matthew N. Dodd <mdodd_at_FreeBSD.ORG>
Date: Sun, 25 May 2003 20:33:31 -0400 (EDT)
On Sun, 25 May 2003, Marcel Moolenaar wrote:
> > I was more concerned with simplicity; the method I use solves the problem
> > with minimal effort and complexity.  The combination of time() + random()
> > + filename will not collide on a single box.
>
> But it can across NFS, right?

Uh...  If you want to share /var/db/prebind via NFS I suppose you can.
I'm not sure how a practical NFS environment would result in a greater
chance of collisions.  Regardless, there is no real penalty for collisions
(other than prebinding not being available for that executable.)

> > I'll be adding a platform identifier to the file header.  All I'm
> > concerned with is being able to reject a file if its not for the current
> > platform.  I have no expectation of cross-generating prebinding files.
>
> Please keep that option open. Not only do we have to deal with byte-
> order on a single platform, we also have to keep an eye on emulation
> layers (ia32 on ia64 and ia32 on amd64).

Its simply not possible to cross-generate prebinding files.  Period.

(You're of course welcome to implement a totally standalone utility that
duplicates much of the functionality that rtld-elf provides.)

> Decoupling the program from its prebinding information can create all
> sorts of nasty (ie unexpected) complexities.

Uh, what?  I'm not parsing this.

> What are the major reasons for not editing the executable in your
> opinion?

Besides it not working?  It is not possible for rtld-elf to access
the section header, let alone additional section data in a clean manner.
Furthermore, rtld-elf is not provided with a valid file handle for the
main executable so hacks to access section data of libraries won't
actually work for the main executable.

I ran around in circles until I'd figured all this out.

-- 
| 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 - 15:33:33 UTC

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