How to convert asm file to o file?
m4 file.asm > file.s
as file.s -o file.o
How to convert c file to o file?
gcc -c file.c
How to compile 2 o files?
gcc file1.o file2.o -o exec
How is object code linked together to create the executable?
Is done by ld (loader), which is usually invoked by gcc as the final step in the compilation process.