Object file format

Object file format is the format of machine code produced by a compiler of a programming language prior to the final linking stage when executables are produced. The object file is not directly runnable, since it contains relocatable code which needs to be run through a linker to combine it with other object files and libraries that are part of a particular program package and convert the memory references to be consistent throughout the package.

There isn't one single "object file format", as the formats are platform and system architecture specific, though standards have sometimes emerged in families of operating systems (e.g., Unix-like systems). Object files of various formats frequently use .obj and .o file extensions.

On Intel chip architectures such as have been used for the PC-DOS/Windows platforms, a format called Relocatable Object Module Format is used. Unix-style systems typically use formats based on COFF or ELF.

This program/executable format should not be confused with other unrelated uses of the term "object file" for files containing representations of 3D objects, some of which confusingly use .obj extensions also.

Links

 * Wikipedia: Object file