What is Object Code?

What is Object Code? What is Object Code for? What is the process of translating object code to machine code called?

I've seen talk until the language C uses assembly as object code, is that right? So in this case we can call it a compilation or assembly process?

Author: Maniero, 2020-05-28

1 answers

The object is a binary generated by the compiler after it has already processed the source code. It usually stays in a file to then be able to generate the executable through the process of linkedition.

The object code is a machine code. The compiler generated this machine code.

C does not use Assembly as Object Code. Some C-specific compiler can generate an Assembly code as an intermediate language so that the object code is then generated by an assembler. It is an implementation detail of a compiler.

I've seen someone using the term for the intermediate language file before the machine code generation, but I don't know if this is right, it seems wrong to me. This intermediate language could be the Assembly, but if it generates a source I find it strange to be the object. In this case the Assembly would be the Target (target) of the C compiler and the Assembly then is the source (Source) of the assembler. So the object code would be the target .

For me object code is almost synonymous with machine code encapsulated in a ready-to-run way after being placed along with other parts in an executable.

In some cases the object code can be grouped into a file of library . You don't have an executable yet but you don't have the fonts.

To better understand about assembler and compiler .

 4
Author: Maniero, 2020-05-29 11:17:02