What is the difference between object code, machine code and assembly code?
Can you give a visual example of their difference?
The source files of your programs are compiled into object files, and then the linker links those object files together, producing an executable file including your architecture's machine codes.
Both object file and executable file involves architecture's machine code in the form of printable and non-printable characters when it's opened by a text editor.
Nonetheless, the dichotomy between the files is that the object file(s) may contain unresolved external references (such as printf
, for instance). So, it may need to be linked against other object files.. That is to say, the unresolved external references are needed to be resolved in order to get the decent runnable executable file by linking with other object files such as C/C++ runtime library's.