Re: FAT binaries and Linux

Mikko Ala-Fossi (malafoss@cc.hut.fi)
Wed, 17 Sep 1997 18:51:56 +0300 (EET DST)


On Wed, 17 Sep 1997, Richard Guenther wrote:
> On Tue, 16 Sep 1997, Teunis Peters wrote:
> > On Sat, 13 Sep 1997, Alan Cox wrote:
> > > > > We call this "FAT binaries" in Nextstep. Our GUI frontend to
> > > > > make generates production code for Motorola, Intel, Sun and HP
> > > > > platforms in a single executeable file.
> > > > I've wished for this in userspace for a long time.. Maby sometime..
> > > Set up yourself a suitable program and set a misc loader for it.
> > Ahh - but can the 'misc' loader take over loading ELF binaries?
> > ('FAT' binaries are possible AFAIK with ELF)
> Well yes, but not as how you would like it ;-)
> The fat binary will have to be recognized by a magic that actually
> differs from normal elf executables!
> Better modify binfmt_elf or ld-linux/ld.

So one has to create binfmt_felf ?

Do existing implementation of "FAT binaries" share data between
binary types?
Would there be any use for data and code sharing?

Of course integers and such depend on byte-order, integer sizes
and alignment, but strings are usually shareable. With code sharing
it would be possible to have only critical functions optimized
for specific processor (386, 486, pentium, pro) and have anything
else shared. Code sharing would also allow usage of same fat binary
with multiple operating systems so that platform independent code
exists only once.

-mikko