.omf</code>, <code>.obj</code>"},"mime":{"wt":""},"type code":{"wt":""},"uniform type":{"wt":""},"magic":{"wt":""},"owner":{"wt":"Tool Interface Standards Committee"},"released":{"wt":"<!-- {{Start date|YYYY|mm|dd|df=yes}} -->"},"latest release version":{"wt":""},"latest release date":{"wt":"<!-- {{Start date and age|YYYY|mm|dd|df=yes}} -->"},"genre":{"wt":"[[Object file]]"},"container for":{"wt":""},"contained by":{"wt":""},"extended from":{"wt":""},"extended to":{"wt":""},"standard":{"wt":""},"free":{"wt":""},"url":{"wt":""}},"i":0}}]}'>
The Object Module Format (OMF) is an object file format used primarily for software intended to run on Intel 80x86 microprocessors. It was originally developed by Intel around 1975–1977 for ISIS-II, targeting the 8-bit Intel 8080/8085 processors. This variant later became known as OMF-80. As OMF-86 it was adapted to the 16-bit 8086 processor in 1978.
Version 4.0 of OMF for the 8086 family was released in 1981 under the name Relocatable Object Module Format, and is perhaps best known to DOS users as an .OBJ file. Versions for the 80286 (OMF-286) and the 32-bit 80386 processors (OMF-386) were introduced in 1981 and 1985, respectively. It has since been standardized by the Tool Interface Standards Committee and was also extended by Microsoft and IBM (IBM-OMF). Intel also adapted the format to the 8051 microcontroller (OMF-51 and AOMF).
N bytes
Data (varies depending on the record type) |
| 1 byte | Checksum or 0 |
There is a wide variety of record types because of consolidation of OMF variants from several vendors, and because of adding such features as 32-bit code and dynamic linking. These are important record types:
- COMENT - (88h) Comment, which may also contain control information.
- EXTDEF - (8Ch) Defines external references
- PUBDEF - (90h/91h) Identifies external symbols in this module
- SEGDEF - (98h/99h) Identifies segments
- GRPDEF - (9Ah) Identifies groups of segments, for example MS-DOS DGROUP
- FIXUPP - (9Ch/9Dh) Fixup or relocation records
- LEDATA - (A0h/A1h) Contains text of a code or data section
- COMDEF - (B0h) Uninitialized common data
- COMDAT - (C2h/C3h) Initialized common data
- MODEND - (8Ah/8Bh) Indicates end of module
There is no header containing file offsets, such as a pointer to a symbol table, in the file; a linker must completely parse the object file to extract all the information.
In the OMF format the data of one section is not necessarily stored as contiguous bytes in the file, instead it can be represented by multiple records. The file format specification (version 1.1) says that this must be done for sections larger than 1 KiB. Records containing relocation information (fixups) must be stored immediately following the data records of the section they apply to, so the section data and the relocation information is "mixed" in the file.
The file format provides special records (LIDATA) that allow compression of repeating data sequences in an object file. It also provides the possibility to store the symbol name of the entry point of the later executable file in one object file.
The file format can also be used as library file format.
The file format is the most important object file format under DOS, 16-bit Windows, and 16-bit and 32-bit OS/2.
Few toolchains use the 32-bit version of the OMF format. For example, the Watcom C toolchain allows generating code for targets that use 32-bit segmented memory layouts; Iron Spring PL/I can generate code for OS/2 32-bit flat memory layouts.
The Embarcadero Delphi compiler used this format when generating obj files for C++. It was the only format of object files that could be linked to a program or unit written in Object Pascal prior to version XE2 of Delphi, which introduced support of COFF format, along with 64-bit Windows target.
{{cite book |title=External Product Specification, 8086 Object Module Formats |version= |publisher=[[Intel Corporation]] |publication-place= |date=1978-12-19 |id= |url= |access-date= }}<!-- Mentioned in the references section of https://mark-ogden.uk/files/intel/publications/481984A%20MCS-51%20Object%20Module%20Format%20v5.0-Sep82.pdf below --></ref>\n<ref name=\"TIS_1995_OMF\">{{cite web |title=Tool Interface Standards (TIS) Relocatable Object Module Format (OMF) Specification |version=Version 1.1 |publisher=TIS Committee / [[Unix International]] |date=May 1995 |orig-date=1993, 1992 |url=http://pagesperso-orange.fr/pierrelib/exec_formats/OMF_v1.1.pdf |access-date=2020-02-07 |url-status=dead |archive-url=https://web.archive.org/web/20200207210113/https://pierrelib.pagesperso-orange.fr/exec_formats/OMF_v1.1.pdf |archive-date=2020-02-07}} [https://web.archive.org/web/20231126142755/http://www.azillionmonkeys.com/qed/Omfg.pdf][https://web.archive.org/web/20231126151214/http://sininenankka.dy.fi/~sami/watcom_mirror/devel/omf.pdf] (87 pages)</ref>\n<ref name=\"Intel_1981_ROMF\">{{cite web |title=8086 Relocatable Object Module Formats |version=Version 4.0 |publisher=[[Intel Corporation]] |publication-place=Santa Clara, California, USA |date=November 1981 |id=Product Number 121748-001. ark:/13960/t07w7pz4b |url=http://www.bitsavers.org/pdf/intel/ISIS_II/121748-001_8086_Relocatable_Object_Module_Formats_Nov81.pdf |access-date=2020-02-08 |url-status=live |archive-url=https://web.archive.org/web/20231125143127/http://www.bitsavers.org/pdf/intel/ISIS_II/121748-001_8086_Relocatable_Object_Module_Formats_Nov81.pdf |archive-date=2023-11-25}} [https://archive.org/details/bitsavers_intel80861ableObjectModuleFormats1981_29998273/][https://mark-ogden.uk/files/intel/publications/121748-001%208086%20Relocatable%20Object%20Module%20Formats-%23Nov81.pdf][https://mark-ogden.uk/files/intel/publications/121748-001%208086%20Relocatable%20Object%20Module%20Formats-%23Oct82.pdf] (124 pages)</ref>\n<ref name=\"Intel_1981_80286\">{{cite book |title=iAPX 286 System Builder User's Guide |date=September 1981 |id=Order Number 121711-001 |publisher=[[Intel Corporation]] |publication-place=Santa Clara, California, USA |url=http://www.bitsavers.org/pdf/intel/MDS3/121711-001_iAPX_286_Evaluation_Builder_Users_Guide_Sep81.pdf |access-date=2023-11-26 |url-status=live |archive-url=https://web.archive.org/web/20231126155806/http://www.bitsavers.org/pdf/intel/MDS3/121711-001_iAPX_286_Evaluation_Builder_Users_Guide_Sep81.pdf |archive-date=2023-11-26}} [https://web.archive.org/web/20231126155830/https://www.ardent-tool.com/CPU/docs/Intel/286/manuals/121711-001.pdf] (90 pages)</ref>\n<ref name=\"Intel_1983_80286\">{{cite book |title=iAPX 286 Operating Systems Writer's Guide |chapter=iAPX 286 Object Module Format |publisher=[[Intel Corporation]] |date=1983 |pages=11-10 – 11-11 |id=Order Number 121960-001 |url=http://www.bitsavers.org/components/intel/80286/121960-001_iAPX_286_Operating_Systems_Writers_Guide_1983.pdf |access-date=2023-11-26 |url-status=live |archive-url=https://web.archive.org/web/20231126152747/http://www.bitsavers.org/components/intel/80286/121960-001_iAPX_286_Operating_Systems_Writers_Guide_1983.pdf |archive-date=2023-11-26}} (2 of 251 pages)</ref>\n<ref name=\"Intel_1991_80386\">{{cite book |title=Specification 386 Object Modules Format |date=1991 |orig-date=1990 |id=Order Number 482991-002 |publisher=[[Intel Corporation]]}}</ref>\n<ref name=\"Intel_1991_386-Boot\">{{cite book |title=Simple Bootloadable Files in 386 Object Modules Format |date=1991 |orig-date=1990 |id=Order Number 483164-001 |publisher=[[Intel Corporation]]}}</ref>\n<ref name=\"Burgett_2017\">{{cite web |title=Development of Intel ISIS Operating System - An interview with Ken Burgett |author-first=Kenneth \"Ken\" |author-last=Burgett |date=2017-11-10 |url=https://www.rogerarrick.com/osiris/burgett.txt |access-date=2023-11-25 |url-status=live |archive-url=https://web.archive.org/web/20231124165914/https://www.rogerarrick.com/osiris/burgett.txt |archive-date=2023-11-24 |quote=A good friend of mine, Bruce, got the job of developing the Object Module Format (OMF) for the [[8080]], and the upcoming [[8086]]. This piece of work would live on for years, since [[MS-DOS]] used it with little or no modifications […] It was a good piece of work and it was updated in 1985 to support the [[80386]] 32-bit flat address mode. […] The OMF gave us a good roadmap for the design of the linker, which knitted object modules together, and the locator, which processed the [[relocatable code]] into a fixed memory image, with a defined entry point, since that was how [[ISIS (operating system)|ISIS]] handled load modules. The locator was also built to enable mapping of a linked module into a set of [[EPROM]] images, so they could be programmed by a [[Programmable ROM|prom-]]burner.}} [https://web.archive.org/web/20231125032320/https://00362628054895325210.googlegroups.com/attach/1cc719e8305ed/burgett.txt?part=0.1&view=1&vt=ANaJVrFYjqMX6NCUFa_l-LUDCL-Mu3EqJS1xO4wZczmxImZg2kP3F8E1qEWYTXI5rHv6URyeMi3pcc1oH5LeyEkzHUSeSnUncsii1D7SyIa5EcFQPzu1fzM][https://web.archive.org/web/20231125121523/https://www.rogerarrick.com/kenburgett/]</ref>\n<ref name=\"Necasek_2020\">{{cite web |title=How Old Is OMF? |author-first=Michal |author-last=Necasek |work=OS/2 Museum |date=2020-07-25 |orig-date=2020-07-09 |url=https://www.os2museum.com/wp/how-old-is-omf/ |access-date=2023-11-25 |url-status=live |archive-url=https://web.archive.org/web/20231125143921/https://www.os2museum.com/wp/how-old-is-omf/ |archive-date=2023-11-25}}</ref>\n<ref name=\"IBM_1994\">{{cite book |title=IBM OS/2 16/32-bit Object Module Format (OMF) and Linear eXecutable Module Format (LX) |version=Version 8 |date=1994-06-30 |orig-date=1991, 1993 |publisher=[[IBM Corporation]] |publication-place=Boca Raton, Florida, USA |url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/pc/os2/OS2_OMF_and_LX_Object_Formats_Revision_8_199406.pdf |access-date=2023-11-26 |url-status=live |archive-url=https://web.archive.org/web/20231126100114/http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/pc/os2/OS2_OMF_and_LX_Object_Formats_Revision_8_199406.pdf |archive-date=2023-11-26}} (v+87 pages)</ref>\n<ref name=\"IBM_1996\">{{cite book |title=IBM OS/2 16/32-bit Object Module Format (OMF) and Linear eXecutable Module Format (LX) |version=Version/Revision 10 |date=1996-10-09 |orig-date=1991 |publisher=[[IBM Corporation]] |publication-place=Boca Raton, Florida, USA |url=https://www.yumpu.com/en/document/read/31229113/ibm-os-2-16-32-bit-object-module-format-omf |access-date=2023-11-26 |url-status=live |archive-url=https://web.archive.org/web/20231126100740/https://www.yumpu.com/en/document/read/31229113/ibm-os-2-16-32-bit-object-module-format-omf |archive-date=2023-11-26}} [https://web.archive.org/web/20231126151317/http://sininenankka.dy.fi/~sami/watcom_mirror/devel/lxomf.pdf] (vi+95 pages)</ref>\n<ref name=\"Intel_1982_8051\">{{anchor|8051}}{{cite book |title=External Product Specification for the MCS-51 Object Module Format |date=1982-09-05 |version=Version 5.0 Revision A |publisher=[[Intel Corporation]] |id=Product Number 9800183B. Document Control Center Number 481984 |url=https://mark-ogden.uk/files/intel/publications/481984A%20MCS-51%20Object%20Module%20Format%20v5.0-Sep82.pdf |url-status=live |archive-url=https://web.archive.org/web/20231125161702/https://mark-ogden.uk/files/intel/publications/481984A%20MCS-51%20Object%20Module%20Format%20v5.0-Sep82.pdf |archive-date=2023-11-25}} (24 pages) (NB. This is the version shipped with Intel's RL51 2.0 and PL/M-51 1.0. There was an earlier version X207 dated 1982-04-12.)</ref>\n<ref name=\"Microsoft_OBJ\">{{cite web |title=The Microsoft OBJ File Format |date= |website=FileFormat.Info |url=https://www.fileformat.info/format/ms-obj/corion.htm |access-date=2023-11-26 |url-status=live |archive-url=https://web.archive.org/web/20231125170744/https://www.fileformat.info/format/ms-obj/corion.htm |archive-date=2023-11-25}}</ref>\n<ref name=\"Intel_1977_AOMF\">{{cite book |title=MCS 80/85 Absolute Object File Formats |date=1977 |type=Technical specification |publisher=[[Intel Corporation]] |publication-place=Santa Clara, California, USA |id=Product Number 9800183B |url=http://www.nj7p.org/Manuals/PDFs/Intel/9800183B.pdf |url-status=dead |archive-url=https://web.archive.org/web/20170627062910/http://www.nj7p.org/Manuals/PDFs/Intel/9800183B.pdf |archive-date=2017-06-27}} (16 pages)</ref>\n<ref name=\"Intel_1981_8080\">{{cite book |title=MCS 80/85 Relocatable Object Module Formats |date=March 1981 |type=Technical specification |publisher=[[Intel Corporation]] |publication-place=Santa Clara, California, USA |id=Product Number 121747-001. A33S/381/S00 IP |url=http://www.bitsavers.org/pdf/intel/ISIS_II/121747-001_MCS_80_85_Relocatable_Object_Formats_Mar81.pdf |access-date=2023-11-25 |url-status=live |archive-url=https://web.archive.org/web/20231125144402/http://www.bitsavers.org/pdf/intel/ISIS_II/121747-001_MCS_80_85_Relocatable_Object_Formats_Mar81.pdf |archive-date=2023-11-25}} (42 pages)</ref>"}},"i":0}}]}'>
Burgett, Kenneth "Ken" (2017-11-10).
"Development of Intel ISIS Operating System - An interview with Ken Burgett".
Archived from the original on 2023-11-24
. Retrieved 2023-11-25. A good friend of mine, Bruce, got the job of developing the Object Module Format (OMF) for the
8080, and the upcoming
8086. This piece of work would live on for years, since
MS-DOS used it with little or no modifications […] It was a good piece of work and it was updated in 1985 to support the
80386 32-bit flat address mode. […] The OMF gave us a good roadmap for the design of the linker, which knitted object modules together, and the locator, which processed the
relocatable code into a fixed memory image, with a defined entry point, since that was how
ISIS handled load modules. The locator was also built to enable mapping of a linked module into a set of
EPROM images, so they could be programmed by a
prom-burner.
1 2