Executable File Types

The number of different executable file types is as many and varied as the number of different image and sound file formats. Every Operating System seems to have several executable file types unique to itself.

This part of the FAQ will give a brief rundown on the various types you will come across.

A quick intro to a few terms,
TEXT is the actual exectuable code area,
DATA is "initialised" data,
BSS is "un-initialised" data.

 

Execs :: EXE (dos "MZ")

The most well documented of the executable file formats, the DOS-MZ was introduced with MS-DOS (not dos v1 tho) as a companion to the simplified DOS-COM file format.

The DOS-MZ was designed to be run in real mode and reflects this, having a relocation table of SEGMENT:OFFSET pairings. A very simple format that can be run at any offset, it does not distinguish between TEXT, DATA and BSS.

Since it was designed to run in real mode, its maximum filesize of code+data+bss is 1mb in size.

Operating Systems that use it :: DOS, Win*, Linux DOS Emu, Amiga DOS Emu

 

Execs :: EXE (Win 3.xx "NE")

The WIN-NE executable formated designed for Windows 3.x was the "NE" New-Executable. Again, a 16bit format, it alleviated the maximum size restrictions that the DOS-MZ had.

Operating Systems that use it :: Windows 3.xx

 

Execs :: EXE (OS/2 "LE")

The "LE" Linear Executable format was designed for IBM's OS/2 operating system by Microsoft. Supporting both 16 and 32bit segments.

fill out more...

Operating Systems that use it :: OS/2, Watcom Compiler/Extender (DOS)

 

Execs :: EXE (Win 9x/NT "PE")

With Windows 95/NT a new exectuable file type was required, thus was born the "PE" Portable Executable. Unlike its predecessors, the WIN-PE was a true 32bit file format, supporting relocatable code. It does distinguish between TEXT, DATA, BSS.

fill out more...

It is infact, a bastardised version of the COFF format.

Operating Systems that use it :: Windows 95/98/NT

 

Execs :: ELF

The ELF, Executable Linkable Format was designed by SUN for use in their Unix clone. A very versatile file format, it was later picked up by many other operating systems for use as both executable files and as shared library files.

fill out more...

It does distinguish between TEXT, DATA and BSS.

 

Execs :: COFF

 

Execs :: AOUT