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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to convert c file to o file?

A

gcc -c file.c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to compile 2 o files?

A

gcc file1.o file2.o -o exec

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly