10.3 Linkers and Loaders Flashcards

1
Q

What is the relationship between a compiler, assembler, linker and assmebly / high level programs

A

Following shows how they relate:

Note: Sometimes compiler may use assembler, other times could go straight to source

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

What are object files (what do they relate to and what do they reference)

A
  • Machine code for one part of program (ie single file)
  • References to external files
  • Object files are generated from translation units (preprocessed source file)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a linker (and what does it do)

A
  • Links the separated object files, into one consistent instruction stream
  • Converts the object files into an executable or library file (exe, dll)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the loader responsible for

A
  • Loading the executable file (on disk) to memory (ram)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is dynamic linking (DLL: dynamic linking loader)

A
  • Allows for references to be resolved at runtime
  • Useful for system calls (don’t want to link entire system), or to decide on different libraries / versions (at runtime)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does an executable look like when loaded into memory

A
  • Each executable has own stack, program, data strcutures etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly