Re: FatELF patches...

From: Valdis . Kletnieks
Date: Sun Nov 01 2009 - 23:59:00 EST


On Sun, 01 Nov 2009 16:35:05 EST, "Ryan C. Gordon" said:

> I glued two full Ubuntu installs together as a proof of concept, but I
> think if Ubuntu did this as a distribution-wide policy, then people would
> probably choose a different distribution.

Hmm.. so let's see - people compiling stuff for themselves won't use this
feature. And if a distro uses it, users would probably go to a different
distro.

That's a bad sign right there...

> Then again, I hope Ubuntu uses FatELF on a handful of binaries, and
> removes the /lib64 and /lib32 directories.

Actually, they can't nuke the /lib{32,64} directories unless *all* binaries
are using FatELF - as long as there's any binaries doing things The Old Way,
you need to keep the supporting binaries around.

> > There is also the issue of speed to launch these things. It *has* to
> > be slower than executing a native file directly.

> In that there will be one extra read of 128 bytes, yes, but I'm not sure
> that's a measurable performance hit. For regular ELF files, the overhead
> is approximately one extra branch instruction. Considering that most files
> won't be FatELF, that seems like an acceptable cost.

Don't forget you take that hit once for each shared library involved. Plus
I'm not sure if there's hidden gotchas lurking in there (is there code that
assumes that if executable code is mmap'ed, it's only done so in one arch?
Or will a FatELF glibc.so screw up somebody's refcounts if it's mapped
in both 32 and 64 bit modes?

Attachment: pgp00000.pgp
Description: PGP signature