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

Replies

Subject Author
Re: [gentoo-alt] Patch breaks Markus Duft <mduft@g.o>