Object code: Difference between revisions

Content deleted Content added
m Adding local short description: "Sequence of statements or instructions in a computer language", overriding Wikidata description "sequence of statements or instructions in a computer language, usually a machine code language" (Shortdesc helper)
mNo edit summary
Line 3:
{{Use dmy dates|date=July 2012}}
{{Program execution}}
In [[computing]], '''object code''' or '''object module''' is the product of a [[compiler]].<ref>{{cite web|url=http://whatis.techtarget.com/definition/0,,sid9_gci211824,00.html|title=Compiler|publisher=TechTarget|quote=Traditionally, the output of the compilation has been called object code or sometimes an object module.|access-date=1 September 2011}}</ref>

In a general sense object code is a sequence of [[statement (computer science)|statements]] or instructions in a computer language,<ref>{{cite book|last1=Aho|first1=Alfred V.|author-link1=Alfred Aho|last2=Sethi|first2=Ravi|author-link2=Ravi Sethi|last3=Ullman|first3=Jeffrey D.|author-link3=Jeffrey Ullman|title=Compilers: principles, techniques, and tools|series=Computer Science|year=1986|publisher=Mark S. Dalton|isbn=0-201-10194-7|page=[https://archive.org/details/compilersprincip0000ahoa/page/704 704]|chapter=10 Code Optimization|url=https://archive.org/details/compilersprincip0000ahoa/page/704}}</ref> usually a [[machine code]] language (i.e., [[binary file|binary]]) or an intermediate language such as [[register transfer language]] (RTL). The term indicates that the code is the [[goal]] or result of the compiling process, with some early sources referring to source code as a "subject program".
 
==Details==
[[Object file]]s can in turn be [[linker (computing)|linked]] to form an [[executable file]] or [[library (computing)|library file]]. In order to be used, object code must either be placed in an executable file, a library file, or an object file.
 
Object code is a portion of machine code that has not yet been linked into a complete program. It is the machine code for one particular library or module that will make up the completed product. It may also contain placeholders or offsets, not found in the machine code of a completed program, that the linker will use to connect everything together. Whereas machine code is binary code that can be executed directly by the CPU, object code has the jumps partially parameterizedparametrized so that a linker can fill them in.
 
An [[assembler (computing)|assembler]] is used to convert [[assembly code]] into machine code (object code). A linker links several object (and library) files to generate an executable. Assemblers can also assemble directly to machine code executable files without the object intermediary step.