Date: Thu, 8 May 1997 16:21:05 +0200 (MET DST) From: Mark Habersack Reply-To: grendel AT hoth DOT amu DOT edu DOT pl To: Chris Matrakidis cc: djgpp-workers AT delorie DOT com, djgpp AT delorie DOT com Subject: Re: PE executable format In-Reply-To: <29181.9705081337@baldrick> Message-ID: Organization: PPP (Pesticide Powered Pumpkins) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 8 May 1997, Chris Matrakidis wrote: > > Why not to chose ELF instead of PE? PE is a modification of COFF and a not > > partiularily good one. ELF OTOH is well designed bottom-up and supported by > > equally large number of utilities. > > The switch from coff to PE is a relatively small one. > The way I understand it, ELF support needs a lot more work. Hmm... PE is also COFF, that's true, but ELF support should not be that hard to achieve in DJGPP. The GCC compiler under Linux uses two targets - a.out and ELF. All this is achieved through the BFD library which allows you to output any of its supported formats using the same set of functions. Sure, there are things specific for each of them, but 90% is the same. ELF support, IMHO, would require *less* work than PE. For PE we'd have to write code to output M$ COFF format, a linker for it and a loader. Besides I'm not sure whether it would be supported by FSF - the change would touch DJGPP only and since it is based on Unix gcc, it should follow its development - adding anything specific for DJGPP to gcc may mean a need to re-implement it with every gcc change. With ELF we'd only have to add a new target to DJGPP and write a loader. Adding new target is just a matter of enabling the new format support in BFD and recompiling the compiler. Examples of how to do that can be taken from the Linux port of GCC. > > However, if you want to run ELF executables under msdos, > http://www.planet.net/pjoshv/cross-elf.html may be useful. I've taken a look at it and, yes, it looks great. But yet it is not a standard and I'd really love to see ELF support in DJGPP P.S. I took liberty to cross-post this message to c.o.m.d as I think it may interest many users of DJGPP.