<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Object_file</id>
	<title>Object file - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Object_file"/>
	<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Object_file&amp;action=history"/>
	<updated>2026-05-04T12:34:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Object_file&amp;diff=224594&amp;oldid=prev</id>
		<title>Manidh: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Object_file&amp;diff=224594&amp;oldid=prev"/>
		<updated>2023-07-26T05:32:42Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:02, 26 July 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Manidh</name></author>
	</entry>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Object_file&amp;diff=224593&amp;oldid=prev</id>
		<title>wikipedia&gt;Guy Harris: In the hatnote, give a less verbose description of what those object file formats are.</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Object_file&amp;diff=224593&amp;oldid=prev"/>
		<updated>2023-02-27T19:38:43Z</updated>

		<summary type="html">&lt;p&gt;In the hatnote, give a less verbose description of what those object file formats are.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|File containing relocatable format machine code}} &lt;br /&gt;
{{redirect|OBJ file|the object file format on DOS|Relocatable Object Module Format|the object file format on 32-bit and 64-bit Windows|COFF|OBJ model files|Wavefront .obj file}}&lt;br /&gt;
An '''object file''' is a computer file containing [[object code]], that is, [[machine code]] output of an [[Assembly language#Assembler|assembler]] or [[compiler]]. The object code is usually [[Relocation (computing)|relocatable]], and not usually directly [[executable]]. There are various formats for object files, and the same machine code can be packaged in different object file formats. An object file may also work like a [[shared library]].&lt;br /&gt;
&lt;br /&gt;
In addition to the object code itself, object files may contain [[metadata]] used for linking or debugging, including: information to resolve symbolic cross-references between different modules, [[relocation (computing)|relocation]] information, [[stack unwinding]] information, [[Comment (computer programming)|comments]], program [[debug symbol|symbols]], debugging or [[profiling (computer programming)|profiling]] information. Other metadata may include the date and time of compilation, the compiler name and version, and other identifying information.&lt;br /&gt;
&lt;br /&gt;
The term &amp;quot;object program&amp;quot; dates from at least the 1950s: {{quote|A term in automatic programming for the machine language program produced by the machine by translating a source program written by the programmer in a language similar to algebraic notation.&amp;lt;ref&amp;gt;{{cite book |last1=Wrubel |first1=Marshal H. |title=A primer of programming for digital computers |date=1959 |publisher=McGraw-Hill |location=New York |page=222 |url=https://catalog.hathitrust.org/Record/000429866 |access-date=July 31, 2020}}&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
A computer programmer generates object code with a [[compiler]] or [[Assembler (computing)|assembler]]. For example, under [[Linux]], the [[GNU Compiler Collection]] compiler will generate files with a .o extension which use the [[Executable and Linkable Format|ELF]] format. Compilation on [[Windows]] generates files with a .obj extension which use the [[COFF]] format. A linker is then used to combine the object code into one executable program or library pulling in precompiled system libraries as needed.&lt;br /&gt;
&lt;br /&gt;
== Object file formats ==&lt;br /&gt;
There are many different object file formats; originally each type of computer had its own unique format, but with the advent of [[Unix]] and other [[porting|portable]] [[operating system]]s, some formats, such as [[Executable and Linkable Format|ELF]] and [[COFF]], have been defined and used on different kinds of systems. It is possible for the same format to be used both as [[linker (computing)|linker]] input and output, and thus as the [[Library (computing)|library]] and [[executable]] file format.&amp;lt;ref&amp;gt;{{cite book|last=IBM Corporation|title=IBM OS Linkage Editor and Loader|year=1973|url=http://www.bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6538-10_Linkage_Editor_Rel_21_Apr73.pdf|access-date=2012-08-06}}&amp;lt;/ref&amp;gt;{{rp|p.16}} Some formats can contain machine code for different processors, with the correct one chosen by the operating system when the program is loaded.&amp;lt;ref&amp;gt;{{cite web |title=FatELF: Universal Binaries for Linux |url=http://icculus.org/fatelf/ |access-date=Aug 2, 2020}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some systems make a distinction between formats which are directly executable and formats which require processing by the linker. For example, [[OS/360 and successors]] call the first format a ''load module'' and the second an ''object module''. In this case the files have entirely different formats.&lt;br /&gt;
&lt;br /&gt;
The design and/or choice of an object file format is a key part of overall system design.  It affects the performance of the linker and thus [[programmer]] turnaround while a program is being developed. If the format is used for executables, the design also affects the time programs take to [[Bootstrapping#Software loading and execution|begin running]], and thus the [[responsiveness]] for users.&lt;br /&gt;
&lt;br /&gt;
===Absolute files===&lt;br /&gt;
Many early computers, or small [[Microcomputer|microcomputers]], support only an absolute object format. Programs are not relocatable; they need to be assembled or compiled to execute at specific, predefined addresses. The file contains no relocation or linkage information. These files can be loaded into read/write memory, or stored in [[read-only memory]]. For example, the [[Motorola 6800]] [[MIKBUG]] monitor contains a routine to read an absolute object file ([[SREC (file format)|SREC Format]]) from [[paper tape]].&amp;lt;ref&amp;gt;{{cite book |last1=Wiles |first1=Mike |last2=Felix |first2=Andre |title=MCM6830L7 MIKBUG/MINIBUG ROM |publisher=Motorola Semiconductor Products, Inc. |url=http://bitsavers.org/components/motorola/6800/Engineering_Note_100_MCM6830L7_MIKBUG_MINBUG_ROM_Jul77.pdf |access-date=July 31, 2020}}&amp;lt;/ref&amp;gt; [[DOS]] [[COM file#DOS binary format|COM files]] are a more recent example of absolute object files.&amp;lt;ref&amp;gt;{{cite book |last1=Godse |first1=D.A. |last2=Godse |first2=A.P. |title=Microprocessor - I |date=2008 |publisher=Technical Publications |location=Pune |isbn=978-81-8431-355-0 |pages=3–15 |edition=First |url=https://books.google.com/books?id=h3Kt3yAgjYYC&amp;amp;pg=RA2-PA15}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Segmentation ===&lt;br /&gt;
Most object file formats are structured as separate sections of data, each section containing a certain type of data. These sections are known as &amp;quot;segments&amp;quot; due to the term &amp;quot;[[memory segment]]&amp;quot;, which was previously a common form of [[memory management]]. When a program is loaded into memory by a [[loader (computing)|loader]], the loader allocates various regions of memory to the program.  Some of these regions correspond to sections of the object file, and thus are usually known by the same names. Others, such as the stack,  only exist at run time. In some cases, [[relocation (computing)|relocation]] is done by the loader (or linker) to specify the actual memory addresses. However, for many programs or architectures, relocation is not necessary, due to being handled by the [[memory management unit]] or by [[position-independent code]]. On some systems the segments of the object file can then be copied (paged) into memory and executed, without needing further processing. On these systems, this may be done ''lazily'', that is, only when the segments are referenced during execution, for example via a [[memory-mapped file]] backed by the object file.&lt;br /&gt;
&lt;br /&gt;
Types of data supported by typical object file formats:&amp;lt;ref&amp;gt;{{cite book |last1=Mauerer |first1=Wolfgang |title=Professional Linux Kernel Architecture |date=2010 |publisher=John Wiley &amp;amp; Sons |isbn=978-0-470-34343-2 |page=Appendix E: The ELF Binary Format |url=https://books.google.com/books?id=-6zvRFEfQ24C&amp;amp;pg=PT1137 |access-date=Aug 1, 2020}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Header (descriptive and control information)&lt;br /&gt;
* [[Code segment]] (&amp;quot;text segment&amp;quot;, executable code)&lt;br /&gt;
* [[Data segment]] (initialized [[static variable]]s)&lt;br /&gt;
* Read-only data segment (''[[rodata]],'' initialized static [[constant (computer programming)|constants]])&lt;br /&gt;
* [[BSS segment]] (uninitialized static data, both variables and constants)&lt;br /&gt;
* External definitions and references for linking&lt;br /&gt;
* [[Relocation (computer science)|Relocation]] information&lt;br /&gt;
* [[Dynamic linking]] information&lt;br /&gt;
* [[Debugging]] information&lt;br /&gt;
&lt;br /&gt;
Segments in different object files may be combined by the linker according to rules specified when the segments are defined. Conventions exist for segments shared between object files; for instance, in [[DOS]] there are [[x86 memory models|different memory models]] that specify the names of special segments and whether or not they may be combined.&amp;lt;ref name=&amp;quot;pc asm&amp;quot; &amp;gt;{{citation |last=Irvine |first=Kip R. |year=1993 |title=Assembly language for the IBM-PC |edition=2nd |publisher=Macmillan |place=New York |isbn=0-02-359651-1 |url-access=registration |url=https://archive.org/details/assemblylanguage0000irvi }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[debugging data format]] of debugging information may either be an integral part of the object file format, as in [[COFF]], or a semi-independent format which may be used with several object formats, such as [[stabs]] or [[DWARF]].&lt;br /&gt;
&lt;br /&gt;
The [[GNU Project]]'s [[Binary File Descriptor library]] (BFD library) provides a common [[API]] for the manipulation of object files in a variety of formats.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
* {{cite book|last=Levine|first=John R.|title=Linkers &amp;amp; Loaders|year=2000|publisher=Morgan Kaufmann Publishers|isbn=1-55860-496-0|pages=256|url=http://linker.iecc.com/}}&lt;br /&gt;
&lt;br /&gt;
{{executables}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Executable file formats]]&lt;br /&gt;
[[Category:Compiler construction]]&lt;br /&gt;
[[Category:Computer libraries]]&lt;br /&gt;
[[Category:Programming language implementation]]&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Guy Harris</name></author>
	</entry>
</feed>