Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 2003 20:33:31 -0400 (EDT)
From:      "Matthew N. Dodd" <mdodd@FreeBSD.ORG>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: Preliminary ELF prebinding patches available.
Message-ID:  <20030525202140.Y86964@sasami.jurai.net>
In-Reply-To: <20030526001924.GA1272@athlon.pn.xcllnt.net>
References:  <20030525061524.H30007@sasami.jurai.net> <xzpaddb8ab8.fsf@flood.ping.uio.no> <20030525222955.GA826@athlon.pn.xcllnt.net> <20030526001924.GA1272@athlon.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
| http://www.jurai.net/~winter |  For Great Justice!  | ISO8802.5 4ever |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030525202140.Y86964>