Compiler Output – Why is it Called Object Code?

compilationetymologyterminology

From the essay Programming Languages Explained by Paul Graham, published in Hackers & Painters:

The high-level language that you feed the compiler is also known as
source code, and the machine language translation it generates is called object code.

From the Wikipedia article on object code:

Object code, or sometimes object module, is what a computer compiler
produces.

From a definition of 'compiler':

Traditionally, the output of the compilation has been called object
code or sometimes an object module. (Note that the term "object" here
is not related to object-oriented programming.)

So what is the term object related to?

Best Answer

Object code is sometimes also called target code, because it is the target result of the translation process performed by compilers. So "object code" is used as an opposite of "source code".

There are other strange names in the compiler world: for example, the segment of the file with the binary code of your program is often called "the text segment".

Related Topic