HOME

TheInfoList



OR:

The Object Module Format (OMF) is an
object file An object file is a file that contains machine code or bytecode, as well as other data and metadata, generated by a compiler or assembler from source code during the compilation or assembly process. The machine code that is generated is kno ...
format Format may refer to: Printing and visual media * Text formatting, the typesetting of text elements * Paper formats, or paper size standards * Newspaper format, the size of the paper page Computing * File format, particular way that informatio ...
used primarily for software intended to run on
Intel 80x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. The ...
microprocessor A microprocessor is a computer processor (computing), processor for which the data processing logic and control is included on a single integrated circuit (IC), or a small number of ICs. The microprocessor contains the arithmetic, logic, a ...
s. It was originally developed by
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
around 1975–1977 for
ISIS-II ISIS, short for Intel System Implementation Supervisor, was an operating system for early Intel microprocessors like the 8080. It was originally developed by Ken Burgett and Jim Stein under the management of Steve Hanna and Terry Opdendyk for th ...
, targeting the 8-bit
8080 The Intel 8080 is Intel's second 8-bit microprocessor. Introduced in April 1974, the 8080 was an enhanced successor to the earlier Intel 8008 microprocessor, although without binary compatibility.'' Electronic News'' was a weekly trade newspa ...
/ 8085 processors. This variant later became known as ''OMF-80''. As ''OMF-86'' it was adapted to the 16-bit
8086 The 8086 (also called iAPX 86) is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus (allo ...
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 DOS (, ) is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
users as an ''.OBJ file''. Versions for the
80286 The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non-multiplexed address and data buses and also the fi ...
(''OMF-286'') and the 32-bit
80386 The Intel 386, originally released as the 80386 and later renamed i386, is the third-generation x86 architecture microprocessor from Intel. It was the first 32-bit processor in the line, making it a significant evolution in the x86 architect ...
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 Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
and
IBM International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
(''IBM-OMF''). Intel also adapted the format to the
8051 The Intel MCS-51 (commonly termed 8051) is a single-chip microcontroller (MCU) series developed by Intel in 1980 for use in embedded systems. The architect of the Intel MCS-51 instruction set was John H. Wharton.. Intel's original versions w ...
microcontroller (''OMF-51'' and ''AOMF'').


File format

Many object file formats consist of a set of tables, such as the relocation table, which are either stored on fixed positions in the file, like the
a.out a.out is a file format used in older versions of Unix-like computer operating systems for executables, object code, and, in later systems, shared libraries. This is an abbreviated form of " assembler output", the filename of the output of Ken T ...
format, or are pointed to by the header, like the
ELF An elf (: elves) is a type of humanoid supernatural being in Germanic peoples, Germanic folklore. Elves appear especially in Norse mythology, North Germanic mythology, being mentioned in the Icelandic ''Poetic Edda'' and the ''Prose Edda'' ...
format. The "sections", code, data area, etc., are stored as contiguous areas of bytes within such files. The Relocatable Object Module Format, however, was designed to require minimal memory when linking, and consists of a series of records that have the following format: 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 Linker or linkers may refer to: Computing * Linker (computing), a computer program that takes one or more object files generated by a compiler or generated by an assembler and links them with libraries, generating an executable program or shar ...
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 A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
file format.


Use

The file format is the most important object file format under DOS, 16-bit
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and 16-bit and 32-bit
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
. 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 PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has b ...
can generate code for OS/2 32-bit flat memory layouts. The
Embarcadero Delphi Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop ...
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 The Common Object File Format (COFF) is a format for executable, object code, and shared library computer files used on Unix systems. It was introduced in Unix System V, replaced the previously used a.out format, and formed the basis for ext ...
format, along with 64-bit Windows target.


See also

* Common Object File Format (COFF) *
Executable and Linkable Format In computing, the Executable and Linkable FormatTool Interface Standard (TIS) Portable Formats SpecificationVersion 1.1'' (October 1993) (ELF, formerly named Extensible Linking Format) is a common standard file format for executable files, obje ...
(ELF) *
a.out a.out is a file format used in older versions of Unix-like computer operating systems for executables, object code, and, in later systems, shared libraries. This is an abbreviated form of " assembler output", the filename of the output of Ken T ...
*
Object file An object file is a file that contains machine code or bytecode, as well as other data and metadata, generated by a compiler or assembler from source code during the compilation or assembly process. The machine code that is generated is kno ...
* Object Module Format (VME) (OMF as used by ICL VME) * Object Module Format (Apple) (OMF as used by ORCA /
Apple IIGS The Apple IIGS (styled as II) is a 16-bit personal computer produced by Apple Inc., Apple Computer beginning in September 1986. It is the fifth and most powerful model of the Apple II family. The "GS" in the name stands for "Graphics and Sound" ...
)


References


Further reading

* Code

ftp://ftp.iecc.com/pub/linker/] Errata

{{Executables Executable file formats Computer file formats