Object code: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Citation needed}}
No edit summary
Line 2:
 
{{Program execution}}
'''Object code''', or sometimes an '''object module''', is what a computer [[compiler]] produces.<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.|accessdate=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.|authorlink1=Alfred Aho|last2=Sethi|first2=Ravi|authorlink2=Ravi Sethi|last3=Ullman|first3=Jeffrey D.|authorlink3=Jeffrey Ullman|title=Compilers: principles, techniques, and tools|series=Computer Science|year=1986|publisher=Mark S. Dalton|isbn=0-201-10194-7|page=704|chapter=10 Code Optimization}}</ref> usually a [[machine code]] language (i.e., 1's and 0's){{citation needed|date=July 2014}} or an intermediate language such as [[Register Transfer Language|RTL]].
 
Object files can in turn be [[Linker (computing)|linked]] to form an executable file or 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 hasn't yet been linked into a complete program. It's 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.
Machine code is binary (1's and 0's){{citation needed|date=July 2014}} code that can be executed directly by the cpu. If you were to open a "machine code" file in a text editor you would see garbage, including unprintable characters.
Object code is a variant of machine code, with a difference that the jumps are sort of parameterized such that a linker can fill them in.
An assembler is used to convert assembly code into machine code (object code). A linker links several object (and library) files to generate an executable.