All Topics  
Object file

 

   Email Print
   Bookmark   Link






 

Object file



 
 
In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, object code, or an object file, is the representation of code that a compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 or assembler generates by processing a source code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
 file. Object files contain compact code, often called "binaries". A linker
Linker

In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....
 is typically used to generate an executable
Executable

In computing, an executable causes a computer "to perform indicated tasks according to encoded instruction ," as opposed to a file that only contains data ....
 or library by linking object files together. The only essential element in an object file is machine code
Machine code

Machine code or machine language is a system of instructions and data executed directly by a computer's central processing unit. Machine code may be regarded as a primitive programming language or as the lowest-level representation of a compiled and/or assembly language computer program....
 (code directly executed by a computer's CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
). Object files for embedded system
Embedded system

An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints....
s might contain nothing but machine code; however, object files often also contain data for use by the code at runtime, relocation information, stack unwinding information, comments, program symbol
Debug symbol

A Debugging symbol is information that tells you which programming-language constructs generated a specific piece of machine code in a given executable module....
s (names of variables and functions) for linking and/or debugging purposes, and other debugging
Debugging

Debugging is a methodical process of finding and reducing the number of computer bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected....
 information.

Object file formats
An object file format is a computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 file format
File format

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....
 used for the storage of object code and related data typically produced by a compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 or assembler
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
.

There are many different object file formats; originally each type of computer had its own unique format, but with the advent of Unix
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
 and other portable
Porting

In computer science, porting is the process of adapting software so that an executable Computer program can be created for a computing environment that is different from the one for which it was originally designed ....
 operating systems, some formats, such as COFF
COFF

The Common Object File Format is a specification of a file format for executable, object code, and shared libraries computer files used on Unix systems....
 and ELF
Executable and Linkable Format

In computing, the Executable and Linking Format is a common standard file format for executables, object code, shared libraries, and core dumps....
, 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.






Discussion
Ask a question about 'Object file'
Start a new discussion about 'Object file'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, object code, or an object file, is the representation of code that a compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 or assembler generates by processing a source code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
 file. Object files contain compact code, often called "binaries". A linker
Linker

In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....
 is typically used to generate an executable
Executable

In computing, an executable causes a computer "to perform indicated tasks according to encoded instruction ," as opposed to a file that only contains data ....
 or library by linking object files together. The only essential element in an object file is machine code
Machine code

Machine code or machine language is a system of instructions and data executed directly by a computer's central processing unit. Machine code may be regarded as a primitive programming language or as the lowest-level representation of a compiled and/or assembly language computer program....
 (code directly executed by a computer's CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
). Object files for embedded system
Embedded system

An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints....
s might contain nothing but machine code; however, object files often also contain data for use by the code at runtime, relocation information, stack unwinding information, comments, program symbol
Debug symbol

A Debugging symbol is information that tells you which programming-language constructs generated a specific piece of machine code in a given executable module....
s (names of variables and functions) for linking and/or debugging purposes, and other debugging
Debugging

Debugging is a methodical process of finding and reducing the number of computer bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected....
 information.

Object file formats


An object file format is a computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 file format
File format

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....
 used for the storage of object code and related data typically produced by a compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 or assembler
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
.

There are many different object file formats; originally each type of computer had its own unique format, but with the advent of Unix
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
 and other portable
Porting

In computer science, porting is the process of adapting software so that an executable Computer program can be created for a computing environment that is different from the one for which it was originally designed ....
 operating systems, some formats, such as COFF
COFF

The Common Object File Format is a specification of a file format for executable, object code, and shared libraries computer files used on Unix systems....
 and ELF
Executable and Linkable Format

In computing, the Executable and Linking Format is a common standard file format for executables, object code, shared libraries, and core dumps....
, 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
Linker

In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....
 and thus programmer
Programmer

A programmer is someone 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....
 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
Responsiveness

The responsiveness of an interactive system describes how quickly it responds to user input . It is one of the criteria under the principle of robustness ....
 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
Paging

In computer operating systems that have their main memory divided into page , paging is a transfer of pages between main memory and an auxiliary store, such as hard disk drive....
 in as needed by the virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
 system, needing no further processing to be ready to use.

The simplest object file format is the DOS
DOS

DOS, short for "Disk Operating System", is a shorthand term for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions Windows 95, Windows 98, and Windows Me....
 .COM
COM file

In many computer operating systems, a COM file is a type of executable; the name is derived from the file name extension .COM. Originally, the term stood for "Command file", a text file containing commands to be issued to the operating system , on many of the Digital Equipment Corporation minicomputer and mainframe operating systems going...
 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
Stabs

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"...
 or DWARF
Dwarf

A dwarf is a creature from Continental Germanic mythology, fairy tales, fantasy fiction, and role-playing games. It usually has magical talents, often involving metallurgy....
.

The GNU Project
GNU Project

The GNU Project is a free software, mass collaboration project, announced on September 27 1983 by Richard Stallman. It initiated the GNU operating system, software development for which began in January 1984....
'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:
  • BSS (Block Started by Symbol)
  • text segment
  • data segment
    Data segment

    A data segment is one of the sections of a program in an object file or in memory, which contains the global variables that are initialized by the programmer....


Notable object file formats


  • DOS
    • .COM
      COM file

      In many computer operating systems, a COM file is a type of executable; the name is derived from the file name extension .COM. Originally, the term stood for "Command file", a text file containing commands to be issued to the operating system , on many of the Digital Equipment Corporation minicomputer and mainframe operating systems going...
    • DOS executable
      DOS executable

      The DOS MZ executable format is the executable file format used for EXE files in DOS.The file can be identified by the ASCII string "MZ" or the hexadecimal 4D 5A at the beginning of the file ....
       (MZ)
    • Relocatable Object Module Format
      Relocatable Object Module Format

      The Relocatable Object Module Format is an object file file format used primarily for software intended to run on Intel 80x86 microprocessors. It was originally developed by Intel under the name Object Module Format, and is perhaps best known to MS-DOS users as a .OBJ file....
       (commonly known as "OBJ file" or "OMF"; also used in Microsoft Windows by some tool vendors)


  • Embedded
    • IEEE-695
    • S-records


  • Macintosh
    • PEF
      Preferred Executable Format

      The Preferred Executable Format is a file format that specifies the format of executable files and other object code. PEF executables are also called Code Fragment Manager files ....
      /CFM
    • Mach-O
      Mach-O

      Mach-O, short for Mach kernel object code file format, is a file format for executables, object code, shared libraries, dynamically-loaded code, and core dumps....
       (NEXTSTEP
      NEXTSTEP

      Nextstep was the original Object-oriented operating system, computer multitasking operating system that NeXT developed to run on its range of proprietary computers, such as the NeXTcube....
      , Mac OS X
      Mac OS X

      Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
      )


  • OpenVMS
    • ELF
      Executable and Linkable Format

      In computing, the Executable and Linking Format is a common standard file format for executables, object code, shared libraries, and core dumps....
    • DWARF
      Dwarf

      A dwarf is a creature from Continental Germanic mythology, fairy tales, fantasy fiction, and role-playing games. It usually has magical talents, often involving metallurgy....
       - Debugging and Traceback information format.


  • Unix
    • a.out
      A.out (file format)

      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....
    • COFF
      COFF

      The Common Object File Format is a specification of a file format for executable, object code, and shared libraries computer files used on Unix systems....
       (System V)
      • ECOFF
        ECOFF

        The Extended Common Object File Format is a file format for executables, object code, and shared libraries.ECOFF was developed for the MIPS platform, and was used by Digital Equipment Corporation Ultrix and Tru64 , Silicon Graphics Irix, and Linux/MIPS Technologies....
         (Mips
        MIPS architecture

        MIPS is a RISC instruction set architecture developed by MIPS Technologies . In the mid to late 1990s, it was estimated that one in three RISC microprocessors produced were MIPS implementations....
        )
      • XCOFF
        XCOFF

        XCOFF, for "eXtended COFF", is an improved and expanded version of the COFF object file format defined by IBM and used in AIX operating system. Early versions of the PowerPC Apple Macintosh also supported XCOFF, as did BeOS....
         (AIX
        AIX operating system

        AIX is the name given to a series of Proprietary software operating systems sold by IBM for several of its computer system platforms, based on UNIX System V with 4.3BSD-compatible command and programming interface extensions....
        )
    • ELF
      Executable and Linkable Format

      In computing, the Executable and Linking Format is a common standard file format for executables, object code, shared libraries, and core dumps....
       (SVR4; used in most modern systems)
    • Mach-O
      Mach-O

      Mach-O, short for Mach kernel object code file format, is a file format for executables, object code, shared libraries, dynamically-loaded code, and core dumps....
       (NeXT
      NeXT

      NeXT, Inc. was an American computer company headquartered in Redwood City, California, California, that developed and manufactured a series of computer workstations intended for the higher education and business markets....
      , Mac OS X
      Mac OS X

      Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
      )


  • Microsoft Windows
    • 16-bit New Executable
      New Executable

      The NE, abbreviation for New Executable, is an executable file format that was introduced with MS-DOS 4.0 , and that was also used later in OS/2 and 16-bit Microsoft Windows....
    • Portable Executable
      Portable Executable

      The Portable Executable format is a file format for executables, object file, and Dynamic-link librarys, used in 32-bit and 64-bit versions of Microsoft Windows operating systems....
       (PE)


  • Others
    • IBM 360 object format
    • NLM
      NetWare Loadable Module

      A NetWare Loadable Module is a Binary file code module that can be loaded into Novell NetWare operating system for execution.NLMs were supported beginning with the Intel 80386-based NetWare#NetWare_3.x version 3.x....
    • OMF (VME)
    • SOM
      System Object Model (file format)

      In computing, the System Object Model is a proprietary executable file format developed by Hewlett-Packard for its HP-UX and HP Multi-Programming Executive operating systems....
       (HP)
    • XBE - Xbox
      Xbox

      The Xbox is a History of video games video game console produced by Microsoft. It was Microsoft's first foray into the gaming console market, and competed with Sony's PlayStation 2 and Nintendo's GameCube....
       executable
    • APP - Symbian OS
      Symbian OS

      Symbian OS is a proprietary software operating system designed for mobile devices, with associated Library , user interface, frameworks and reference implementations of common tools, developed by Symbian Ltd....
       executable file format.
    • RDOFF
      RDOFF

      RDOFF, the Relocatable Dynamic Object File Format, was born from the need for NASM developers to test the integrity of NASM's object file output capabilities....
    • Hunk
      Amiga Hunk

      Hunk is the executable file format of tools and programs of the AmigaOS based on Motorola 68000 CPU and other processors of the same family.This kind of executable got its name from the fact that the software programmed on Amiga is divided in its internal structure into many pieces called hunks, in which every portion could contain eith...
       - AmigaOS
      AmigaOS

      AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000....


See also

  • Linker
    Linker

    In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....