Object file format

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Add elfdump to Software and References. Add Executable and Linkable Format to Links.)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|extensions={{ext|o}}, {{ext|obj}}
 
|extensions={{ext|o}}, {{ext|obj}}
 
}}
 
}}
'''Object file format''' is the format of [[Machine language|machine code]] produced by a compiler of a [[Programming Languages|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.
+
'''Object file format''' is the format of [[Machine language|machine code]] produced by a compiler of a [[Programming Languages|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.
 
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]].
+
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 and CAD/CAM Models|3D objects]], some of which confusingly use .obj extensions also.
 
This program/executable format should not be confused with other unrelated uses of the term "object file" for files containing representations of [[3D and CAD/CAM Models|3D objects]], some of which confusingly use .obj extensions also.
 +
 +
== Software ==
 +
* elfdump (Available in certain *BSD flavors<ref>[https://forums.freebsd.org/threads/type-o-files-how-does-one-edit.40500/post-224795 Post #8 by kpa of "Type *.o files. How does one edit?" - FreeBSD forums]</ref><ref>[https://sourceforge.net/projects/elfdump/ elfdump - SourceForge project page]</ref> and Solaris<ref>[https://docs.oracle.com/cd/E23823_01/html/816-5165/elfdump-1.html Synopsis - man pages section 1: User Commands - Oracle Docs]</ref>)
  
 
== Links ==
 
== Links ==
 
* [[Wikipedia:Object file|Wikipedia: Object file]]
 
* [[Wikipedia:Object file|Wikipedia: Object file]]
* [[Wikipedia:Relocatable Object Module Format|Wikipedia: Relocatable Object Module Format]]
+
* [[Executable and Linkable Format]] - Predominantly for Unix-like OS, but conveys similar naming conventions.
 +
 
 +
== References ==
 +
<references/>

Latest revision as of 01:05, 10 August 2025

File Format
Name Object file format
Ontology
Extension(s) .o, .obj

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.

[edit] Software

  • elfdump (Available in certain *BSD flavors[1][2] and Solaris[3])

[edit] Links

[edit] References

  1. Post #8 by kpa of "Type *.o files. How does one edit?" - FreeBSD forums
  2. elfdump - SourceForge project page
  3. Synopsis - man pages section 1: User Commands - Oracle Docs
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox