Object Module Format (Intel)
Filename extension | .omf , .obj |
---|---|
Developed by | Tool Interface Standards Committee |
Type of format | Object file |
The Object Module Format (OMF) is an
Version 4.0 of OMF for the 8086 family was released in 1981 under the name Relocatable Object Module Format,
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 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:
Size | Contents |
---|---|
1 byte | Record type, for example relocation information |
2 bytes | Data length (N+1) |
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
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
Use
The file format is the most important object file format under DOS, 16-bit
Few toolchains use the 32-bit version of the OMF format. For example, the
The
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 COFFSee also
- Common Object File Format (COFF)
- Executable and Linkable Format (ELF)
- a.out
- Object file
- Object Module Format (VME)(OMF as used by ICL VME)
- Object Module Format (Apple) (OMF as used by ORCA / Apple IIGS)
References
- Intel Corporation. 1977. Product Number 9800183B. Archived from the original(PDF) on 2017-06-27. (16 pages)
- Intel Corporation. March 1981. Product Number 121747-001. A33S/381/S00 IP. Archived(PDF) from the original on 2023-11-25. Retrieved 2023-11-25. (42 pages)
- ^ 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]
- ^ a b Necasek, Michal (2020-07-25) [2020-07-09]. "How Old Is OMF?". OS/2 Museum. Archived from the original on 2023-11-25. Retrieved 2023-11-25.
- Intel Corporation. 1978-12-19.
- (124 pages)
- (90 pages)
- Intel Corporation. 1983. pp. 11-10–11-11. Order Number 121960-001. Archived(PDF) from the original on 2023-11-26. Retrieved 2023-11-26. (2 of 251 pages)
- Intel Corporation. 1991 [1990]. Order Number 482991-002.
- Intel Corporation. 1991 [1990]. Order Number 483164-001.
- UNIX International, Inc. May 1995 [1993, 1992]. Archived from the original (PDF) on 2020-02-07. Retrieved 2020-02-07. [7][8](87 pages)
- ^ "The Microsoft OBJ File Format". FileFormat.Info. Archived from the original on 2023-11-25. Retrieved 2023-11-26.
- Intel Corporation. 1982-09-05. Product Number 9800183B. Document Control Center Number 481984. Archived(PDF) from the original on 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.)
- IBM Corporation. 1994-06-30 [1991, 1993]. Archived(PDF) from the original on 2023-11-26. Retrieved 2023-11-26. (v+87 pages)
- (vi+95 pages)
Further reading
- OCLC 42413382. Archived from the original on 2013-01-25. Retrieved 2020-01-12. Code: [10][11] Errata: [12]