Filename extension | .omf , .obj |
---|---|
Developed by | Tool Interface Standards Committee |
Type of format | Object file |
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, targetting the 8-bit 8080/8085 processors. [1] [2] [3] [4] This variant later became known as OMF-80. As OMF-86 it was adapted to the 16-bit 8086 processor in 1978. [5] Version 4.0 for the 8086 family was released in 1981 under the name Relocatable Object Module Format, [6] [3] [4] and is perhaps best known to DOS users as an .OBJ file. Versions for the 80286 (OMF-286) [7] [8] and the 32-bit 80386 processors (OMF-386) [9] [10] [3] were introduced in 1981 and 1985, respectively. It has since been standardized by the Tool Interface Standards Committee [11] and was also extended by Microsoft [12] and IBM (IBM-OMF). Intel also adapted the format to the 8051 microcontroller (OMF-51 [13] and AOMF).
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:
DGROUP
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. [14] [15]
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.
In computing, the Executable and Linkable Format, is a common standard file format for executable files, object code, shared libraries, and core dumps. First published in the specification for the application binary interface (ABI) of the Unix operating system version named System V Release 4 (SVR4), and later in the Tool Interface Standard, it was quickly accepted among different vendors of Unix systems. In 1999, it was chosen as the standard binary file format for Unix and Unix-like systems on x86 processors by the 86open project.
The Intel 80286 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 first with memory management and wide protection abilities. The 80286 used approximately 134,000 transistors in its original nMOS (HMOS) incarnation and, just like the contemporary 80186, it could correctly execute most software written for the earlier Intel 8086 and 8088 processors.
The 8086 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, and is notable as the processor used in the original IBM PC design.
The Intel 8088 microprocessor is a variant of the Intel 8086. Introduced on June 1, 1979, the 8088 has an eight-bit external data bus instead of the 16-bit bus of the 8086. The 16-bit registers and the one megabyte address range are unchanged, however. In fact, according to the Intel documentation, the 8086 and 8088 have the same execution unit (EU)—only the bus interface unit (BIU) is different. The 8088 was used in the original IBM PC and in IBM PC compatible clones.
The Intel 80186, also known as the iAPX 186, or just 186, is a microprocessor and microcontroller introduced in 1982. It was based on the Intel 8086 and, like it, had a 16-bit external data bus multiplexed with a 20-bit address bus. The 80188 variant, with an 8-bit external data bus was also available.
x86 is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introduced in 1978 as a fully 16-bit extension of Intel's 8-bit 8080 microprocessor, with memory segmentation as a solution for addressing more memory than can be covered by a plain 16-bit address. The term "x86" came into being because the names of several successors to Intel's 8086 processor end in "86", including the 80186, 80286, 80386 and 80486 processors. Colloquially, their names were "186", "286", "386" and "486".
The Netwide Assembler (NASM) is an assembler and disassembler for the Intel x86 architecture. It can be used to write 16-bit, 32-bit (IA-32) and 64-bit (x86-64) programs. It is considered one of the most popular assemblers for Linux and x86 chips.
The Portable Executable (PE) format is a file format for executables, object code, DLLs and others used in 32-bit and 64-bit versions of Windows operating systems, and in UEFI environments. The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. This includes dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data. On NT operating systems, the PE format is used for EXE, DLL, SYS, MUI and other file types. The Unified Extensible Firmware Interface (UEFI) specification states that PE is the standard executable format in EFI environments.
The A20, or address line 20, is one of the electrical lines that make up the system bus of an x86-based computer system. The A20 line in particular is used to transmit the 21st bit on the address bus.
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 known as object code.
The iAPX 432 is a discontinued computer architecture introduced in 1981. It was Intel's first 32-bit processor design. The main processor of the architecture, the general data processor, is implemented as a set of two separate integrated circuits, due to technical limitations at the time. Although some early 8086, 80186 and 80286-based systems and manuals also used the iAPX prefix for marketing reasons, the iAPX 432 and the 8086 processor lines are completely separate designs with completely different instruction sets.
A fat binary is a computer executable program or library which has been expanded with code native to multiple instruction sets which can consequently be run on multiple processor types. This results in a file larger than a normal one-architecture binary file, thus the name.
The Microsoft Macro Assembler (MASM) is an x86 assembler that uses the Intel syntax for MS-DOS and Microsoft Windows. Beginning with MASM 8.0, there are two versions of the assembler: One for 16-bit & 32-bit assembly sources, and another (ML64) for 64-bit sources only.
Virtual DOS machines (VDM) refer to a technology that allows running 16-bit/32-bit DOS and 16-bit Windows programs when there is already another operating system running and controlling the hardware.
Multiuser DOS is a real-time multi-user multi-tasking operating system for IBM PC-compatible microcomputers.
Relocation is the process of assigning load addresses for position-dependent code and data of a program and adjusting the code and data to reflect the assigned addresses. Prior to the advent of multiprocess systems, and still in many embedded systems, the addresses for objects were absolute starting at a known location, often zero. Since multiprocessing systems dynamically link and switch between programs it became necessary to be able to relocate objects using position-independent code. A linker usually performs relocation in conjunction with symbol resolution, the process of searching files and libraries to replace symbolic references or names of libraries with actual usable addresses in memory before running a program.
Intel hexadecimal object file format, Intel hex format or Intellec Hex is a file format that conveys binary information in ASCII text form, making it possible to store on non-binary media such as paper tape, punch cards, etc., to display on text terminals or be printed on line-oriented printers. The format is commonly used for programming microcontrollers, EPROMs, and other types of programmable logic devices and hardware emulators. In a typical application, a compiler or assembler converts a program's source code to machine code and outputs it into a object or executable file in hexadecimal format. In some applications, the Intel hex format is also used as a container format holding packets of stream data. Common file extensions used for the resulting files are .HEX or .H86. The HEX file is then read by a programmer to write the machine code into a PROM or is transferred to the target system for loading and execution. There are various tools to convert files between hexadecimal and binary format, and vice versa.
A source-to-source translator, source-to-source compiler, transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent source code in the same or a different programming language. A source-to-source translator converts between programming languages that operate at approximately the same level of abstraction, while a traditional compiler translates from a higher level programming language to a lower level programming language. For example, a source-to-source translator may perform a translation of a program from Python to JavaScript, while a traditional compiler translates from a language like C to assembler or Java to bytecode. An automatic parallelizing compiler will frequently take in a high level language program as an input and then transform the code and annotate it with parallel code annotations or language constructs.
FlexOS is a discontinued modular real-time multiuser multitasking operating system (RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business Unit in Monterey, California, in 1985, the system was considered to become a successor of Digital Research's earlier Concurrent DOS, but with a new, modular, and considerably different system architecture and portability across several processor families. Still named Concurrent DOS 68K and Concurrent DOS 286, it was renamed into FlexOS on 1 October 1986 to better differentiate the target audiences. FlexOS was licensed by several OEMs who selected it as the basis for their own operating systems like 4680 OS, 4690 OS, S5-DOS/MT and others. Unrelated to FlexOS, the original Concurrent DOS system architecture found a continuation in successors like Concurrent DOS XM and Concurrent DOS 386 as well.
In marketing, iAPX was a short lived designation used for several Intel microprocessors, including some 8086 family processors. Not being a simple initialism seems to have confused even Intel's technical writers as can be seen in their iAPX-88 Book where the asterisked expansion shows iAPX to mean Intel Advanced Processor System.
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.