Subject: Re: When is ELF coming?
To: Thor Lancelot Simon <firstname.lastname@example.org>
From: Erik M. Theisen <etheisen@TECLink.Net>
Date: 11/23/1996 13:25:08
> ECOFF really isn't a bad executable format.
> For one thing, unlike many other -- ELF in particular -- it actually has an
> OS type field, in addition to a machine-type field. Since I now have to
> deal with *three* different OS flavors of ELF on the i386, two of which don't
> use any sensible method at all for indicating that their binaries use their
> particular ABI and one of which uses a method that even its own variant of
> 'file' can't distinguish (but, thankfully, its kernel can), it's hard for me
> to see ELF as a good choice.
> Can someone actually enumerate some good reasons for using ELF rather than
> ECOFF, our own extended a.out, or, say, OSF/ROSE? Each has some drawbacks,
> but none seemingly so severe as ELF's lack of an OS-type header field.
It's not just a problem with OS tags. It also lacks a simple way to determine
if it's stripped or if it's statically linked.
More seriously a ELF binary from our OS can inadvertately be executed on
foreign OSs (SVR4 for example) resulting in a core. OS vendors won't make an
effort to fix this and the fault will be ours.
The situation is getting worse too. SCO just shipped SCO UNIX in ELF format.
This breaks ibcs compat. And SCO has no way to determine if its executing a
native bin, a UNIXWare bin, or something else. In my book, they are shipping
two broken OSs.
I really think the native OS format should be used for a given target
platform. If you insist on going ELF I suggest you take a good look at OLF
(Open Linkage Format) instead as it resolves these problems.
OLF is ELF but prevents bogus OSs from executing one of our bins accidentally.
It provides OS identification, strip tags, and dynamic linked tags. Foreign
OS bins are converted and tagged allowing complete identification as to the
type and contents of the binary.
GNU binutils can spit OLF out with very, very minor mods to the ELF code. I
have already created the necessary tools to convert to and from ELF. And most
of the kernel mods are minor.
If and when ELF version 2 comes out and fixes these problems, it is a simple
matter to return to ELF and OLF can be retired.
If the free OS community comes together on this we'll be far better in the
long run. One standard format is always the way to go.