Separate Compilation Flashcards

1
Q

Source Code is often divided into ________

A

several modules (compilation units) i.e. separate .c or .s files

This makes development of large projects easier

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

How can modules be compiled?

A

Modules can be compiled into relocatable object code

Will be put into corresponding .o files

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

Object code is _____ together to create an executable

A

linked

Is done by the ld (loader), which is usually invoked by gcc as the final step in the compilation process

ld resolved any references to external data or functions in other modules

Code and data are relocated in memory as necessary to form contiguous text, data and bss sections

[examples in notes]

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