Jeko, I've told you before - ELF is the way to go, for various reasons.
But, I find myself in the mood to rant, so I do - and thus, this post.
As for those who say PE is "more efficient" or "better on RAM", no, not really. It has some minor advantages, such as being able to resolve symbols via ordinal numbers - instead of by name. However, afaik, Microsoft now looks DOWN on people using ordinals exclusively - since those numbers are difficult to keep uniform across Shared library releases (or so I have read...).
Now, onto efficiency - in relation to memory. PE is less efficient in the long term. Why? Because as soon as a DLL has to be rebased, it's text is no longer sharable amongst other programs. .DLLs all have a preferred base address and, are gnerally only relocated when that address is not available. Sure - it's possible that the relocated DLL could be shared to another program, in the case that the rebased address is available but, that can be argued to be a 'special case'.
Compare this to ELF - where code can be truly position-independent _and_ sharable. Data may need to be copied or otherwise made exclusive - but the code itself, can be shared EVEN when it HAS been relocated. How? Why?
Two useful tables : GOT, PLT.
As PIC calls are resolved via the PLT - and variables resolved via the GOT, the code does not NEED necessarily ever have to be modified - aslong as the offsets from the code AND the GOT/PLT are consistent. So says the ELF documentation. Also, when code IS relocated - it isn't the code that is modified - it is the GOT/PLT. IIRC, both of which are private to whatever ELF is in question.
Constrast that:
PE, relocated DLL to a new base - Code has been copied, modified - cannot be shared.
VS
ELF, relocated DSO, plt/got has been changed - Code can still be shared, etc.
I'll set my watch and warrant on the GOT/PLT pair being smaller than the code itself.
So, in this case - ELF wins.
Also, when it comes to the specific designs - ELF is much, much more general. PE/COFF is mostly specific
to Windows (apart from the few projects that make use of it). There is a LOT of crap that your OS is unlikely to need.
Ie: Major/Minor Subsystem Identifiers, Major/Minor bla bla bla. Not to mention the MSDOS stub, etc.
While ELF binaries maybe larger than the equivalent PE, at least the space is spent wisely (storing relocation entries, symbol tables, a lot of which can be stripped...) vs. pointless MSDOS stubs and 'redundant' COFF headers.
ELF PIC Executables are simple.
ELF Shared Objects are simple.
Dynamic Linkers for both, are actually quite simple.
ELF Relocatables (.o) are more of a pain in the @$$ but, once you have a DL working, is quite simple.
Not to mention, tools to produce ELF are available on virtually every platform imaginable without major armtwisting.
Except of course, under Windows and even then, you have Cygwin to ease your pain.
~elderK
EDIT: ELF is _NOT_ an extension of the PE/COFF format. PE is an extension of the COFF format, ELF was new.
XCOFF, ECOFF, PE/C0OFF, COFF - those are COFF based. ELF, isn't.