Reputation:
I am reading about object code (I am not asking what object code is), and became confused when encountering the following:
*When reading about assembler:
An assembler program creates object code by translating combinations of mnemonics and syntax for operations and addressing modes into their numerical equivalents.
And when reading about object code itself:
In computing, object code or object module is the product of a compiler.
However, when looking at components of the compiler, no articles that I have read really include the assembler as part of the compiler, like
So how can object code be "the product of a compiler" if the assembler program "is not part of the compiler"?
Upvotes: 0
Views: 343
Reputation: 8088
The 'assembly source code' (pre-object code gen) is equivalent to the intermediate code or intermediate representation (IR) that gets generated by the compiler (in your diagram). It then goes through passes to optimize and produce object code native to the target machine ABI.
Whether or not the IR is used to produce object code or another IR (such as that consumable by an interpreter) is up to the compiler design and intent.
Not seeing the word 'assembler' in the diagram is trying to parse the semantics of the diagram into syntactical sugar.
Upvotes: -2
Reputation: 310840
Either:
In either case, when the compiler exits, what you have is object code, ready for the linker.
NB Your picture doesn't show the linker either, but you won't get a target program without it.
Upvotes: 3