The Common Object File Format (COFF) is a specification of a format Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for different kinds of information. Within any format type, e.g., word processor documents, there will typically be several different formats. Sometimes for executable In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU. However, in a more general sense, a file containing instructions, object code In computer science, an object file is an organized collection of separate, named sequences of machine code[citation needed]. Each sequence, or object, typically contains instructions for the host machine to accomplish some task, possibly accompanied by related data and metadata . A linker is typically used to generate an executable or library by, and shared library In computer science, a library is a collection of subroutines or classes used to develop software computer files A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished. Computer files can be considered as the modern used on Unix Unix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna. Today's Unix systems are split into various branches, developed over time by AT&T as well as various commercial vendors and non-profit systems. It was introduced in Unix System V Unix System V, commonly abbreviated SysV , is one of the versions of the Unix operating system. It was originally developed by American Telephone & Telegraph (AT&T) and first released in 1983. Four major versions of System V were released, termed Releases 1, 2, 3 and 4. System V Release 4, or SVR4, was commercially the most successful, and formed the basis for extended specifications such as XCOFF and ECOFF, before being largely replaced by ELF In computing, the Executable and Linkable Format is a common standard file format for executables, object code, shared libraries, and core dumps. First published in the System V Application Binary Interface specification, and later in the Tool Interface Standard, it was quickly accepted among different vendors of Unix systems. In 1999 it was, introduced with SVR4 Unix System V, commonly abbreviated SysV , is one of the versions of the Unix operating system. It was originally developed by American Telephone & Telegraph (AT&T) and first released in 1983. Four major versions of System V were released, termed Releases 1, 2, 3 and 4. System V Release 4, or SVR4, was commercially the most successful. COFF and its variants continue to be used on some Unix-like A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification systems, on Microsoft Windows Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal, and in EFI The Extensible Firmware Interface is a specification that defines a software interface between an operating system and platform firmware. EFI is a much larger, more complex, OS-like:4 replacement for the older BIOS firmware interface present in all IBM PC-compatible personal computers. The EFI specification was originally developed by Intel, and environments.

Contents

History

The original Unix object file format a.out is a very simple design, unable to adequately support, for example, symbolic debugging Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. Many entire books have been written information and shared libraries In computer science, a library is a collection of subroutines or classes used to develop software. As development of Unix-like A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification systems continued both inside and outside AT&T, different solutions to these and other issues emerged.

COFF was introduced in AT&T AT&T Inc. is the largest provider of fixed telephony in the United States, and also provides broadband and subscription television services. AT&T is the second largest provider of mobile telephony service in the United States, with over 85.1 million wireless customers, and more than 210 million total customers's UNIX System V Unix System V, commonly abbreviated SysV , is one of the versions of the Unix operating system. It was originally developed by American Telephone & Telegraph (AT&T) and first released in 1983. Four major versions of System V were released, termed Releases 1, 2, 3 and 4. System V Release 4, or SVR4, was commercially the most successful for non-VAX 32-bit platforms such as the 3B20[citation needed]. Improvements over the existing AT&T a.out format included built-in support for symbolic debugging information, shared libraries, and an extension mechanism.

However, while COFF was an improvement over a.out, the design was too limited: there was a limit on the maximum number of sections, a limit on the length of section names, and the symbolic debugging information was incapable of supporting newer languages such as C++. With the release of SVR4, AT&T replaced COFF with ELF In computing, the Executable and Linkable Format is a common standard file format for executables, object code, shared libraries, and core dumps. First published in the System V Application Binary Interface specification, and later in the Tool Interface Standard, it was quickly accepted among different vendors of Unix systems. In 1999 it was; IBM International Business Machines (NYSE: IBM) is a multinational computer, technology and IT consulting corporation headquartered in Armonk, North Castle, New York, United States. IBM is the world's fourth largest technology company and the second most valuable by global brand (after Coca-Cola). IBM is one of the few information technology companies used the XCOFF format in AIX AIX is the name given to a series of proprietary operating systems sold by IBM for several of its computer system platforms, based on UNIX System V with 4.3BSD-compatible extensions; DEC, SGI and others used ECOFF; and other systems extended their executable formats in non-portable ways to overcome their limitations.

While extended versions of COFF continue to be used for some Unix-like platforms, primarily in embedded systems, perhaps the most widespread use of the COFF format today is in Microsoft Microsoft Corporation is a public multinational corporation based in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions. Established on April 4, 1975 to develop and sell BASIC interpreters for the Altair 8800,'s Portable Executable The Portable Executable format is a file format for executables, object code, and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture. The PE format is a data structure that encapsulates the (PE) format. Developed for Windows NT Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was originally designed to be a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement consumer versions of, the PE format (sometimes written as PE/COFF) uses a COFF header for object files, and as a component of the PE header for executable files.[1]

Features

COFF's main improvement over a.out was the introduction of multiple named sections in the object file. Different object files could have different numbers and types of sections.

Symbolic Debugging Information

The COFF symbolic debugging information consists of symbolic (string) names for program functions and variables, and line number information, used for setting breakpoints and tracing execution. The a.out format does not provide built-in support for symbolic debugging information, although this can be at least partially overcome using mechanisms such as stabs.

Symbolic names are stored in the COFF symbol table. Each symbol table entry includes a name, storage class, type, value and section number. Short names (8 characters or fewer) are stored directly in the symbol table; longer names are stored as an offset into the string table at the end of the COFF object.

Storage classes describe the type entity the symbol represents, and may include external variables (C_EXT), automatic (stack) variables (C_AUTO), register variables (C_REG), functions (C_FCN), and many others. The symbol type describes the interpretation of the symbol entity's value, and includes values for all the C C is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system data types.

When compiled with appropriate options, a COFF object file will contain line number information for each possible break point in the text section of the object file. Line number information takes two forms: in the first, for each possible break point in the code, the line number table entry records the address and its matching line number. In the second form, the entry identifies a symbol table entry representing the start of a function, enabling a breakpoint to be set using the function's name.

Relative Virtual Address

When a COFF file is generated, it is not usually known where in memory it will be loaded. The virtual address where the first byte of the file will be loaded is called image base address. The rest of the file is not necessarily loaded in a contiguous block, but in different sections.

Relative Virtual Addresses (RVAs) are not to be confused with standard virtual addresses. A relative virtual address is the virtual address of an object from the file once it is loaded into memory, minus the base address of the file image. If the file were to be mapped literally from disk to memory, the RVA would be the same as that of the offset into the file, but this is actually quite unusual.

Note that the RVA term is only used with objects in the image file. Once loaded into memory, the image base address is added, and ordinary VAs are used.

See also

Notes

  1. ^ Microsoft Corporation 2006b

References

External links

Executable In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU. However, in a more general sense, a file containing instructions file formats Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for different kinds of information. Within any format type, e.g., word processor documents, there will typically be several different formats. Sometimes
a.out · COFF · COM · ECOFF · ELF In computing, the Executable and Linkable Format is a common standard file format for executables, object code, shared libraries, and core dumps. First published in the System V Application Binary Interface specification, and later in the Tool Interface Standard, it was quickly accepted among different vendors of Unix systems. In 1999 it was · Hunk · Mach-O Mach-O, short for Mach object file format, is a file format for executables, object code, shared libraries, dynamically-loaded code, and core dumps. A replacement for the a.out format, Mach-O offered more extensibility and faster access to information in the symbol table · MZ · NE · OMF · PE (exe) The Portable Executable format is a file format for executables, object code, and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture. The PE format is a data structure that encapsulates the · PEF · XCOFF

Categories: Executable file formats

 

The above information uses material from Wikipedia and is licensed under the GNU Free Documentation License The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a.
Some facts may not have been fully verified for accuracy. [Disclaimers Wikipedia is an online open-content collaborative encyclopedia, that is, a voluntary association of individuals and groups working to develop a common resource of human knowledge. The structure of the project allows anyone with an Internet connection to alter its content. Please be advised that nothing found here has necessarily been reviewed by]
This page was last archived by our server on Wed Jul 28 19:21:35 2010. [ refresh local cache ]
Displaying this page or its contents does not use any Wikimedia Foundation's resources.
The owners of this site proudly support the Wikimedia Foundation.