Résumé
An object file is a computer file containing object code, that is, machine code output of an assembler or compiler. The object code is usually relocatable, and not usually directly executable. There are various formats for object files, and the same machine code can be packaged in different object file formats. An object file may also work like a shared library. In addition to the object code itself, object files may contain metadata used for linking or debugging, including: information to resolve symbolic cross-references between different modules, relocation information, stack unwinding information, comments, program symbols, debugging or profiling information. Other metadata may include the date and time of compilation, the compiler name and version, and other identifying information. The term "object program" dates from at least the 1950s: A term in automatic programming for the machine language program produced by the machine by translating a source program written by the programmer in a language similar to algebraic notation. A computer programmer generates object code with a compiler or assembler. For example, under Linux, the GNU Compiler Collection compiler will generate files with a .o extension which use the ELF format. Compilation on Windows generates files with a .obj extension which use the COFF format. A linker is then used to combine the object code into one executable program or library pulling in precompiled system libraries as needed. 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 ELF and COFF, have been defined and used on different kinds of systems. It is possible for the same format to be used both as linker input and output, and thus as the library and executable file format. Some formats can contain machine code for different processors, with the correct one chosen by the operating system when the program is loaded.
À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.