HOME

TheInfoList



OR:

The Object Module Format (OMF) is an object file
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 microprocessors. It was originally developed by Intel around 1975–1977 for
ISIS-II ISIS, short for Intel System Implementation Supervisor, is 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 the ...
, targeting the 8-bit 8080/
8085 The Intel 8085 ("''eighty-eighty-five''") is an 8-bit microprocessor produced by Intel and introduced in March 1976. It is software-binary compatible with the more-famous Intel 8080 with only two minor instructions added to support its added i ...
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 The Intel 386, originally released as 80386 and later renamed i386, is a 32-bit microprocessor introduced in 1985. The first versions had 275,000 transistors were introduced in 1981 and 1985, respectively. It has since been standardized by the
Tool Interface Standards Committee A tool is an object that can extend an individual's ability to modify features of the surrounding environment or help them accomplish a particular task. Although many animals use simple tools, only human beings, whose use of stone tools dates ba ...
and was also extended by Microsoft and IBM (''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 were po ...
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 Th ...
format, or are pointed to by the header, like the ELF 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 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.


Use

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 Watcom C/C++ (currently Open Watcom C/C++) is an integrated development environment (IDE) product from Watcom International Corporation for the C (programming language), C, C++, and Fortran programming languages. Watcom C/C++ was a commercial pro ...
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.


See also

* Common Object File Format (COFF) * Executable and Linkable Format (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 Th ...
* Object file * Object Module Format (VME) (OMF as used by ICL VME) * Object Module Format (Apple) (OMF as used by ORCA / Apple IIGS)


References


Further reading

* Code

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

{{Executables Executable file formats Computer file formats