executable file format

In computer science, object code, or an object file, is the representation of code that a compiler or assembler generates by processing a source code file. Object files contain compact code, often called "binaries". A linker is typically used to generate an executable or library by linking object files together. The only essential element in an object file is machine code (code directly executed by a computer's CPU). Object files for embedded systems might contain nothing but machine code. However, object files often also contain data for use by the code at runtime, relocation information, program symbols (names of variables and functions) for linking and/or debugging purposes, and other debugging information.

Object file formats

An object file format is a computer file format used for the storage of object code and related data typically produced by a compiler or assembler.

There are many different object file formats; originally each type of computer had its own unique format, but with the advent of Unix and other portable operating systems, some formats, such as COFF and ELF, have been defined and used on different kinds of systems. It is common for the same file format to be used both as linker input and output, and thus as the library and executable file format.

The design and/or choice of an object file format is a key part of overall system design. It affects the performance of the linker and thus programmer turnaround while developing. If the format is used for executables, the design also affects the time programs take to begin running, and thus the responsiveness for users. Most object file formats are structured as blocks of data, each block containing a certain type of data. These blocks can be paged in as needed by the virtual memory system, needing no further processing to be ready to use.

The simplest object file format is the DOS .COM format, which is simply a file of raw bytes that is always loaded at a fixed location. Other formats are an elaborate array of structures and substructures whose specification runs to many pages.

Debugging information may either be an integral part of the object file format, as in COFF, or a semi-independent format which may be used with several object formats, such as stabs or DWARF.

The GNU project's BFD library provides a common API for the manipulation of object files in a variety of formats.

Types of data supported by typical object file formats:

Notable object file formats

See also

References

Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems.
..... Click the link for more information.
compiler is a computer program (or set of programs) that translates text written in a computer language (the source language) into another computer language (the target language).
..... Click the link for more information.
Assembler may refer to:
  • Assembler for an assembly language, a computer program to translate between lower-level representations of computer programs
  • Assembler (bioinformatics), a program to perform genome assembly

..... Click the link for more information.
source code (commonly just source or code) is any sequence of statements and/or declarations written in some human-readable computer programming language.
..... Click the link for more information.
linker or link editor is a program that takes one or more objects generated by compilers and assembles them into a single executable program.

In IBM mainframe environments such as OS/360 this program is known as a linkage editor.
..... Click the link for more information.
executable or executable file, in computer science, is a file whose contents are meant to be interpreted as a program by a computer.

While a file in source form may be executable, such a file is usually referred to as a "script.
..... Click the link for more information.
library is a collection of subprograms used to develop software. Libraries contain "helper" code and data, which provide services to independent programs. This allows code and data to be shared and changed in a modular fashion.
..... Click the link for more information.
Machine code or machine language is a system of instructions and data directly executed by a computer's central processing unit. Machine code is the lowest-level of abstraction for representing a computer program.
..... Click the link for more information.
central processing unit (CPU), or sometimes simply processor, is the component in a digital computer capable of executing a program.(Knott 1974) It interprets computer program instructions and processes data.
..... Click the link for more information.
An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions.[1] It is usually embedded as part of a complete device including hardware and mechanical parts.
..... Click the link for more information.


In computer science, relocation is the process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program.
..... Click the link for more information.
Symbols are objects, characters, or other concrete representations of ideas, concepts, or other abstractions. For example, in the United States, Canada and Great Britain, a red octagon is a symbol for the traffic sign meaning "STOP".
..... Click the link for more information.
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.
..... Click the link for more information.
computer is a machine which manipulates data according to a list of instructions.

Computers take numerous physical forms. The first devices that resemble modern computers date to the mid-20th century (around 1940 - 1941), although the computer concept and various machines
..... Click the link for more information.
A file format is a particular way to encode information for storage in a computer file.

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.
..... Click the link for more information.
compiler is a computer program (or set of programs) that translates text written in a computer language (the source language) into another computer language (the target language).
..... Click the link for more information.
Unix (officially trademarked as 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 and Douglas McIlroy.
..... Click the link for more information.
COFF

File extension: none, .o
Developed by: AT&T
Type of format: Binary, executable, object, shared libraries
Extended to: XCOFF, ECOFF, Portable Executable The Common Object File Format (COFF
..... Click the link for more information.
ELF

File extension: none, .o, .so
Developed by: Unix System Laboratories
Type of format: Binary, executable, object, shared libraries, core dump In computing, the Executable and Linking Format (ELF, formerly called
..... Click the link for more information.
linker or link editor is a program that takes one or more objects generated by compilers and assembles them into a single executable program.

In IBM mainframe environments such as OS/360 this program is known as a linkage editor.
..... Click the link for more information.
programmer or software developer is someone who programs computers, that is, one who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software.
..... Click the link for more information.
Responsiveness is a principle from interaction design / HCI, saying that a system's response to user input should happen with no perceivable delay. Responsiveness is considered a vital requirement for any user interface, and the lack of it will usually result in frustration.
..... Click the link for more information.
paging, sometimes called swapping, is a transfer of pages between main memory and an auxiliary store, such as hard disk drive.[1] Paging is an important part of virtual memory implemention in most contemporary general-purpose operating systems, allowing to easily
..... Click the link for more information.
This article is about the computer term. For the TBN game show, see Virtual Memory (game show).
Virtual memory is an abstraction implemented in a computer that gives an application program the impression it has contiguous working memory, while in fact it is
..... Click the link for more information.
DOS (from Disk Operating System) commonly refers to the family of closely related operating systems which dominated the IBM PC compatible market between 1981 and 1995 (or until about 2000, if Windows 9x systems are included): DR-DOS, FreeDOS, MS-DOS, Novell-DOS, OpenDOS, PC-DOS,
..... Click the link for more information.
.COM redirects here. For the top level internet domain, see .com.


COM

File extension: .com
Type of format: Executable The file name extension .
..... Click the link for more information.
stabs (sometimes written STABS) is a debugging data format for storing information about computer programs for use by symbolic and source-level debuggers. It "was apparently invented by Peter Kessler at the University of California, Berkeley" [1]
..... Click the link for more information.
DWARF is a widely used, standardized debugging data format. DWARF was originally designed along with ELF, although it is independent of object file formats.[1] The name is a pun on "ELF" that has no official meaning but "may be an acronym for 'Debug With Attributed
..... Click the link for more information.
GNU (pronounced ) is a computer operating system composed entirely of free software.
..... Click the link for more information.
An application programming interface (API) is a source code interface that an operating system or library provides to support requests for services to be made of it by computer programs.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.