Request: make coff2omf free

John Reimer terminal.node at gmail.com
Sun Feb 25 09:29:46 PST 2007


On Sun, 25 Feb 2007 10:48:36 +0100, Frits van Bommel wrote:

> John Reimer wrote:
>> On Sat, 24 Feb 2007 22:33:11 -0800, Walter Bright wrote:
>> 
>>> Why does Mingw do coff on Win32, while the gcc tools everywhere else do 
>>> elf? This makes no sense to me.
>> 
>> 
>> It seems that elf is an object /and/ executable format, so it requires
>> support from the OS somehow.  
> 
> Only if you use the executable format. I don't see any reason it 
> couldn't be used as an object format (unless PE executables need 
> information ELF has no way to represent).
> 


Okay, thanks.  That clarifies things a little.  So elf must have two
formats in one, and the object elf format is not dependentant on the elf
executable format?  So really it comes down to whether the elf object
format can embed in a PE?  Further, for elf shared libraries, I assume
having an appropriate dynamic linker is still important.

Strangely finding information  like this online is extremely difficult. 
All I know is that there was a project (several years ago ~1999) 
that provided a elf-linker/loader for NT which now has fallen into
non-existance: it was called cross-elf.


>> Whereas coff is merely an object format and PE appears to be windows
>> executable format.
>> 
>> That may be the reason that mingw went coff instead, even it it isn't
>> compatible with MS coff objects.
> 
> IIRC mingw is compatible with *some* MS .lib files. It may be just 
> import libraries, and/or just C libraries.
> I remember there being *-msvc and *-mingw .libs for one library (I think 
> it was Allegro or SDL or some such) where the difference was _what they 
> were compiled with_, not _what they could be used with_. In fact, IIRC 
> it was recommended to use the *-msvc libs even for mingw...


Yes, this might be possible, but I'm not sure how it works, since I read
online somewhere that mingw uses a different naming convention for its
coff as well as other small changes (dss).  Maybe the mingw linker (ld)
understands more than its own coff variation, however.  That
makes mingw look even better in my eyes.  I know mingw ld.exe supports a
whole bunch of other linker formats including elf -- huge bonus.  The only
one it doesn't support is OMF! :)

-JJR



More information about the Digitalmars-d mailing list