PE

From OSDev.wiki
Revision as of 12:19, 11 August 2008 by Kmcguire (talk | contribs) (Added "Someone's Perspective On PE32 Vs ELF32" link to the forums for poster.)
Jump to navigation Jump to search
This page is a stub.
You can help the wiki by accurately adding more contents to it.
Executable Formats
Microsoft

16 bit:
COM
MZ
NE
Mixed (16/32 bit):
LE
32/64 bit:
PE
COFF

*nix
Apple

With Windows 95/NT, a new executable file type was required. Thus was born the "PE" Portable Executable, which is still in use. Unlike its predecessors, WIN-PE is a true 32bit file format, supporting relocatable code. It does distinguish between TEXT, DATA, and BSS. It is, in fact, a bastardized version of the COFF format.

If you did set up a Cygwin environment on your Windows machine, "PE" is the target format for your Cygwin GCC toolchain, which causes the unaware some headache when trying to link parts build under Cygwin with parts build under Linux or BSD (which use the ELF target by default). (Hint: You have to build a GCC Cross-Compiler)

The PE format is used by Windows 95 and higher, Windows NT 3.1 and higher, the Mobius and ReactOS. A modified but compatible version is used for .NET assemblies on both Windows and Linux (with Mono).

See Also