Re: Prebinding for DragonFly/FreeBSD-4

2003-09-14 Thread Simon 'corecode' Schubert
Lately Matthew N. Dodd told:

 Prebinding on a per executable basis rather than a per object (ELF
 executable or library) means that when you go to prebind KDE (for
 example) you run /var out of diskspace :/

Yes, that might be true. How about this approach:
(doesn't cope with cyclic ``needs'' yet)

- assign every .so a base address so that no collisions happen for every
  binary considered

Then, for every binary:
- start with resolving the last object (often libc), as if only this
  object was loaded
- proceed to the next object (might be another .so or the binary)
- there again, resolve stuff. if this changes resolved data in
  objects resolved before (global references...), save this data too,
  like deltas to the data of the object before.
- loop

This means: Every object has the data assigned which it ultimatively
requests. If globals etc exists they will overridden by the next object
which requested previous object.

On load, just run the same way. First, load data of the last object
(i.e. libc), then running the object list back to the binary, load data.
Globals that get resolved another way than without object X will be
overwriten by the patchup data for object X.

Uhg, I hope I made myself (at least partly) clear enough to follow.

cheers
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Prebinding for DragonFly/FreeBSD-4

2003-09-12 Thread Simon 'corecode' Schubert
I created patch for DragonFly/FreeBSD-4 for prebinding, based on
mdodd@'s patch for FreeBSD-5.

The main difference (apart from the target platform) is that the linker
needn't be patched. Rtld now uses a hash function to get an unique ID
for every ELF object.

This has been tested under DragonFly, but should run on FreeBSD-4 too.

Feedback appreciated :)

cheers
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Re: Prebinding for DragonFly/FreeBSD-4

2003-09-12 Thread Simon 'corecode' Schubert
No-brainer.

Get the patch from here:
http://chlamydia.fs.ei.tum.de/~corecode/prebind.diff


-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Re: Prebinding for DragonFly/FreeBSD-4

2003-09-12 Thread Matthew N. Dodd
On Sat, 13 Sep 2003, Simon 'corecode' Schubert wrote:
 Feedback appreciated :)

Prebinding on a per executable basis rather than a per object (ELF
executable or library) means that when you go to prebind KDE (for example)
you run /var out of diskspace :/

I don't yet have a totally satisfactory solution (mostly because I haven't
really worked on prebinding for some time.)

Hopefully you get some use out of this though. :)


-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |   2 x '84 Volvo 245DL| ix86,sparc,pmax |
| http://www.jurai.net/~winter |  For Great Justice!  | ISO8802.5 4ever |
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]