Comparison of executable file formats
From HandWiki
This is a comparison of binary executable file formats which, once loaded by a suitable executable loader, can be directly executed by the CPU rather than being interpreted by software. In addition to the binary application code, the executables may contain headers and tables with relocation and fixup information as well as various kinds of meta data. Among those formats listed, the ones in most common use are PE (on Microsoft Windows), ELF (on Linux and most other versions of Unix), Mach-O (on macOS and iOS) and MZ (on DOS).
Format name | Operating system | Filename extension | Explicit processor declarations | Arbitrary sections | Metadata[lower-alpha 1] | Digital signature | String table | Symbol table | 64-bit | Fat binaries | Can contain icon |
---|---|---|---|---|---|---|---|---|---|---|---|
ELF | Unix-like, OpenVMS, BeOS from R4 onwards, Haiku, SerenityOS | none (though .elf is sometimes used unofficially[citation needed])
|
Yes by file | Yes | Yes | Extension[1] | Yes | Yes[2] | Yes | Extension[3] | Extension[4] |
PE | Windows, ReactOS, HX DOS Extender, BeOS (R3 only) | .EXE
|
Yes by file | Yes | Yes | Yes[5] | Yes | Yes | No | Only MZ (DOS)[6] | Yes |
PE32+ | Windows (64-bit editions only) | .EXE
|
Yes by file | Yes | Yes | Yes | Yes | Yes | Yes | "Compiled Hybrid Portable Executable" | Yes |
Mach-O[7] | NeXTSTEP, macOS, iOS, watchOS, tvOS | none | Yes by section | Some (limited to max. 256 sections) | Yes | Yes | Yes | Yes | Yes | Yes | No |
OS/360 | OS/360 and successors, and VS/9, mainframe operating systems | none | No | No | No | No | No | Yes | Yes | No | No |
GOFF | IBM MVS and z/OS mainframe operating systems | none | No | No | Yes | No | Yes | Yes | Yes | No | No |
a.out | Unix-like | none | No | No | No | No | Yes[8] | Yes[8] | Extension | No | No |
COFF | Unix-like | none | Yes by file | Yes | No | No | Yes | Yes | Extension | No | No |
ECOFF | Ultrix, Tru64 UNIX, IRIX | none | Yes by file | Yes | No | No | Yes | Yes | Yes | No | No |
XCOFF | IBM AIX, BeOS, "classic" Mac OS | none | Yes by file | Yes | No | No | Yes | Yes[9] | Yes | No | No |
SOM | HP-UX, MPE/ix | ? | Unknown | Unknown | No | No | Unknown | Yes | No | Unknown | No |
Amiga Hunk | AmigaOS | none | No | Yes | Yes | No | No | Yes | No | Yes | No |
PEF[10] | "classic" Mac OS, BeOS (PPC only) | none | Yes by file | No | No | No | Yes | Yes | No | No | No |
CMD | CP/M-86, MP/M-86, Concurrent CP/M-86, Personal CP/M-86, S5-DOS, Concurrent DOS, Concurrent DOS 286, FlexOS, S5-DOS/ST, S5-DOS/MT, Concurrent DOS 386, Multiuser DOS, System Manager, REAL/32, DOS Plus | .CMD
|
No (x86 only) | Yes | No | No | Extension | Extension | No | No | No |
FlexOS 186 | FlexOS 186, FlexOS 286, S5-DOS/ST, S5-DOS/MT, 4680 OS, FlexOS 386, 4690 OS | .186
|
No (186/188 and higher only) | Yes | No | No | Extension | Extension | No | No | No |
FlexOS 286 | FlexOS 286, S5-DOS/ST, S5-DOS/MT, 4680 OS, FlexOS 386, 4690 OS | .286
|
No (286 and higher only) | Yes | No | No | Extension | Extension | No | No | No |
CP/M-68K | CP/M-68K, Concurrent DOS 68K, FlexOS 68K | .68K
|
No (68000 and higher only) | Yes | No | No | Unknown | Unknown | No | No | No |
COM (CP/M) | CP/M, MP/M, Concurrent CP/M, Personal CP/M | .COM
|
No (8080/Z80 only) | Extension (BDOS 3 and higher only) | No | No | No | No | No | Extension | No |
COM (DOS) | DOS, OS/2, Windows (except for 64-bit editions), Concurrent CP/M-86 (BDOS 3.1 only), Concurrent DOS, Concurrent DOS 286, FlexOS, Concurrent DOS 386, Multiuser DOS, System Manager, REAL/32, DOS Plus | .COM
|
No (x86 only) | No | Extension (Novell/Caldera VERSION etc.) | No | No | No | Extension | Extension | No |
MZ (DOS) | DOS, OS/2, Windows (except for 64-bit editions), Concurrent DOS 286, FlexOS, Concurrent DOS 386, Multiuser DOS, System Manager, REAL/32, DOS Plus | .EXE
|
No (x86 only) | Yes | Extension (Novell/Caldera VERSION etc.) | No | Extension | Extension | Extension | No | No |
MZ (GEM) | GEM, ViewMAX | .APP/.ACC
|
No (x86 only) | Yes | No | No | Unknown | Unknown | No | No | Unknown |
NE | MS-DOS 4.0 (multitasking), OS/2, Windows, HX DOS Extender | .EXE
|
Unknown | Unknown | Unknown | No | Unknown | Unknown | No | Only MZ (DOS)[11] | Yes |
LE, (W3, W4) | OS/2 (2.0 and higher only), some DOS extenders | .EXE
|
Yes by file (286 and higher only) | Yes | Yes | No | Yes | Yes | No | No | Yes |
LX | OS/2 (2.0 and higher only), some 32-bit DOS extenders | .EXE
|
Yes by file | Yes | Yes | No | Yes | Yes[12] | No | No | Yes |
PIM/XIP | PalmDOS (MINIMAX applications only) | .PIM/.XIP
|
No (x86 only) | Yes | No | No | No | No | No | No | No |
DL | MS-DOS System Manager applications (HP LX series only) | .EXM
|
No (186/188 and higher only) | Yes | No | No | No | No | No | No | No |
MP | Phar Lap DOS extenders | .EXP
|
Unknown (286 and higher only) | Yes | No | No | Unknown | Unknown | No | No | No |
P2 | Phar Lap 16-bit DOS extenders | .EXP
|
Unknown (286 and higher only) | Yes | No | No | Unknown | Unknown | No | No | No |
P3 | Phar Lap 32-bit DOS extenders | .EXP
|
Unknown (386 and higher only) | Yes | No | No | Unknown | Unknown | No | No | No |
GEOS | PC/GEOS, Geoworks Ensemble, NewDeal Office, Breadbox Ensemble | .GEO
|
Unknown (x86 only) | Unknown | Unknown | No | Unknown | Unknown | No | No | Unknown |
Notes
- ↑
- Metadata is casually used to describe the controlling data used in software architectures that are more abstract or configurable. Most executable file formats include what may be termed "metadata" that specifies certain, usually configurable, behavioral runtime characteristics. However, it is difficult if not impossible to precisely distinguish program "metadata" from general aspects of stored-program computing architecture; if the machine reads it and acts upon it, it is a computational instruction, and the prefix "meta" has little significance.
- In Java, the class file format contains metadata used by the Java compiler and the Java virtual machine to dynamically link classes and to support reflection. The Java Platform, Standard Edition since J2SE 5.0 has included a metadata facility to allow additional annotations that are used by development tools.
- In MS-DOS, the COM file format does not normally include metadata, while the EXE file and Windows PE formats do. These metadata can include the company that published the program, the date the program was created, the version number and more.
- In the .NET Framework executable format, extra metadata is included to allow reflection at runtime.
References
- ↑ "elfsign – Freecode". Freshmeat.net. http://freshmeat.net/projects/elfsign/.
- ↑ "(3elf) - Elf library routines". Uw714doc.sco.com. 25 April 2004. http://uw714doc.sco.com/en/man/html.3elf/elf_getarsym.3elf.html.
- ↑ "FatELF: Universal Binaries for Linux". Icculus.org. http://icculus.org/fatelf/.
- ↑ "ElfIcon: Icons for ELF files". Compholio.com. http://www.compholio.com/elfres/.
- ↑ "Windows Authenticode Portable Executable Signature Format". Microsoft. 29 August 2008. http://www.microsoft.com/whdc/winlogo/drvsign/Authenticode_PE.mspx.
- ↑ History of Portable Executable
- ↑ "Mac OS X ABI Mach-O File Format Reference". Apple Inc.. 4 February 2009. https://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html#//apple_ref/doc/uid/20001298-BAJIHABI.
- ↑ 8.0 8.1 "a.out(5) - FreeBSD Man Pages". Freebsd.org. 10 June 2010. http://www.freebsd.org/cgi/man.cgi?query=a.out&sektion=5.
- ↑ "Files Reference – XCOFF Object File Format". IBM. http://pic.dhe.ibm.com/infocenter/aix/v7r1/topic/com.ibm.aix.files/doc/aixfiles/XCOFF.htm.
- ↑ "MPW Command Reference - DumpPEF". Apple Inc.. https://developer.apple.com/tools/mpw-tools/commandref/dumppef.htm.
- ↑ DOS stub of New Executable
- ↑ "LX - Linear eXecutable Module Format Description". 3 June 1992. http://www.oldlinux.org/Linux.old/study/sabre/os/files/Executables/LX.txt.
Original source: https://en.wikipedia.org/wiki/Comparison of executable file formats.
Read more |