Program, library and object file formats
Compiled machine code. A compiler turns each source file into an object file, with gaps
left for the addresses of things defined elsewhere; a linker joins object files and
libraries, fills the gaps and writes a program or library that the operating system loads
and runs. Each system has its own formats: Windows uses PE (and before it NE and MS-DOS MZ),
Linux and most Unix systems use ELF, and Apple’s systems use Mach-O. One .exe
extension covers several formats, and so does .obj: see
the .EXE overview and
the .OBJ overview for how to tell them apart.
Formats
.A
AIX big archiveIBM AIX’s archive with linked members and 32-bit and 64-bit symbol tables.
.A
AIX small archiveThe older AIX archive: linked members and one symbol table, in narrower fields.
.A
BSD and macOS static libraryThe ar archive format of macOS and the BSDs.
.A
System V and GNU static libraryThe ar archive format of Linux and most Unix systems.
.A
GNU thin archiveAn archive that lists its members but leaves their data in other files.
.A2F
Apple II fileAn Applesoft or Integer BASIC program or machine code from an Apple II disk.
.BBC
BBC Micro fileA BBC BASIC program or machine code from a BBC Micro disc or tape.
.BIN
Color Computer machine-language fileTandy Color Computer and Dragon BIN files: segments with load addresses and an execution address, in 6809 code; found by structure, not by the name .bin.
.BIN
Raw machine codeMachine code with no header, read as the code of a CPU you choose; reached through Read as.
.COM
MS-DOS COM programSmall DOS programs with no header, loaded at offset 0x100.
.DLL
.NET assembly.NET assemblies and modules: a PE file with ECMA-335 metadata tables, heaps and signatures.
.DOL
GameCube and Wii executableNintendo GameCube and Wii programs: a 256-byte header listing up to 18 sections, then the sections.
.DYLIB
Mach-O executable and libraryPrograms, .dylib libraries and universal binaries on macOS and iOS.
.ELF
Executable and Linkable FormatPrograms, libraries and object files on Linux and Unix systems.
.EXE
Linear Executable (LE)32-bit Windows VxD drivers and DOS extender programs, in paged objects.
.EXE
OS/2 executable (LX)32-bit OS/2 programs and DLLs, in paged objects.
.EXE
MS-DOS executable (MZ)16-bit DOS programs: an MZ header, relocations and the code.
.EXE
16-bit Windows executable (NE)Windows 3.x and early OS/2 programs and DLLs, in movable segments.
.EXE
Windows executable (PE32)32-bit Windows programs and DLLs, with a 32-bit optional header (magic 0x10B).
.EXE
Windows 64-bit executable (PE32+)64-bit Windows programs and DLLs (x64, ARM64), with a 64-bit optional header (magic 0x20B).
.HUNK
Amiga HUNK fileAmiga programs, object files and link libraries: a list of hunks of code and data with relocations.
.KO
Linux kernel moduleLoadable Linux drivers and features: ELF objects with module info.
.LIB
Windows COFF libraryWindows linker libraries: COFF objects or DLL import records in an archive.
.LIB
Short import objectOne member of an import library: a header and two strings.
.LIB
OMF libraryA library of OMF object modules from 16-bit compilers.
.OBJ
Anonymous object headerThe wrapper Microsoft’s compiler writes for link-time code generation.
.OBJ
COFF object file (bigobj)The extended form of COFF, for objects with very many sections.
.OBJ
COFF object fileCompiled code from Windows compilers, waiting for the linker.
.OBJ
OMF object fileIntel’s object format for 16-bit DOS and Windows compilers, in typed records.
.OUT
Unix a.out executableThe original Unix executable: a 32-byte header, text, data and symbols.
.P00
PC64 single-file containerOne Commodore 64 file with its name in a 26-byte C64File header (PC64).
.PRG
Commodore 64 programC64 programs: a 2-byte load address, then BASIC and 6510 code.
.R00
PC64 REL fileOne Commodore 64 relative file with its name and record size in a 26-byte C64File header (PC64), .r00 to .r99.
.REL
GameCube and Wii relocatable moduleNintendo GameCube and Wii modules a game loads at run time: sections, an import table and relocation lists.
.SAV
RT-11 SAV programThe DEC RT-11 program for the PDP-11: a memory image saved from address 0, with the start address, stack pointer and high limit in block 0.
.TOS
Atari ST executableAtari ST, TT and Falcon programs (.PRG .TOS .TTP .APP .ACC): a header starting $601A, text and data, symbols and a relocation table.
.XEX
Atari 8-bit executableAtari 8-bit programs: segments with addresses, run and init vectors.