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