On 08/26/2010 10:54 AM, Markus Duft wrote:
> On 08/26/2010 08:42 AM, Christopher Warrington wrote:
>> "Al" <oss.elmar@googlemail.com> @ 2010-8-25 3:25 AM:
>>> Yes, Cygwin is not ELF but COFF.
>>
>> I've almost always heard Windows executables called Portable Executables
>> (PEs) [1]. Though, according to the article, PEs are an evolution of COFFs.
>
> Windows uses (that's the _real_ name

) PE/COFF. this means, PE
> (personal executable) is the "container" (dll, exe), but the objects are
> COFF (common object file format).
hah - as haubi pointed out correctly, it's Portable Executable, of
course, not Personal Executable - fail :]
markus
>
>>
>> Looking at a Cygwin binary (/usr/sbin/httpd2.exe from [2]), I do see the the
>> PE magic number [3], 0x4D 0x5A ("MZ"), not what appears to be the COFF magic
>> numbers [4], 0x4C 0x01.
>
> yeah, right, but the objects that make up the binary all had the COFF
> magic. the linker then puts those together and outputs a PE binary,
> containing all the sections from each COFF object.
>
> markus
>
>>
>> [1] <http://en.wikipedia.org/wiki/Portable_Executable>
>> [2]
>> <http://cygwin.iphoneapps4free.org/release/apache2/apache2-2.2.6-1.tar.bz2>
>> [3] <http://en.wikipedia.org/wiki/Magic_number_(programming)>
>> [4] <http://www.delorie.com/djgpp/doc/coff/filhdr.html>
>>
>
>