Gentoo Archives: gentoo-alt

From: Markus Duft <mduft@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Patch breaks
Date: Thu, 26 Aug 2010 09:05:11
Message-Id: 4C762E43.90803@gentoo.org
In Reply to: Re: [gentoo-alt] Patch breaks by Markus Duft
1 On 08/26/2010 10:54 AM, Markus Duft wrote:
2 > On 08/26/2010 08:42 AM, Christopher Warrington wrote:
3 >> "Al" <oss.elmar@××××××××××.com> @ 2010-8-25 3:25 AM:
4 >>> Yes, Cygwin is not ELF but COFF.
5 >>
6 >> I've almost always heard Windows executables called Portable Executables
7 >> (PEs) [1]. Though, according to the article, PEs are an evolution of COFFs.
8 >
9 > Windows uses (that's the _real_ name ;)) PE/COFF. this means, PE
10 > (personal executable) is the "container" (dll, exe), but the objects are
11 > COFF (common object file format).
12
13 hah - as haubi pointed out correctly, it's Portable Executable, of
14 course, not Personal Executable - fail :]
15
16 markus
17
18 >
19 >>
20 >> Looking at a Cygwin binary (/usr/sbin/httpd2.exe from [2]), I do see the the
21 >> PE magic number [3], 0x4D 0x5A ("MZ"), not what appears to be the COFF magic
22 >> numbers [4], 0x4C 0x01.
23 >
24 > yeah, right, but the objects that make up the binary all had the COFF
25 > magic. the linker then puts those together and outputs a PE binary,
26 > containing all the sections from each COFF object.
27 >
28 > markus
29 >
30 >>
31 >> [1] <http://en.wikipedia.org/wiki/Portable_Executable>
32 >> [2]
33 >> <http://cygwin.iphoneapps4free.org/release/apache2/apache2-2.2.6-1.tar.bz2>
34 >> [3] <http://en.wikipedia.org/wiki/Magic_number_(programming)>
35 >> [4] <http://www.delorie.com/djgpp/doc/coff/filhdr.html>
36 >>
37 >
38 >