Linkers, Loaders and Libraries Flashcards

1
Q

Libraries

A

Ready-compiled and tested programs that can be run when needed

  • Typically grouped together into software libraries
  • Most programming languages have extensive pre-built functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Dynamic Link Libraries

A

Contain sub-routines written to carry out common tasks on the Windows OS
All the programmer needs to do is call the appropriate DLL sub-routine with correct parameters, and the Save As dialogue box appears.

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

Benefits of library routines

A

Benefits:

  • Quick and easy to use and hook into your own code
  • Pre-tested, so you can be relatively sure they already free from errors
  • Pre-compiled, so they are typically optimised to run quickly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Drawbacks of library routines

A

Drawbacks:

  • Adding functionality or making specific tweaks can be difficult/impossible
  • Sometimes you are ‘black-boxed’ from actual implementation
  • You have to trust that the developers will continue to maintain the library
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Linker

A

Linker is responsible for putting the appropriate machine address in all the external call and return instructions so all modules and external library routines are linked together correctly
Also links any separately complied into subroutines into the object code.

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

Static Linking

A

All the required code from the libraries is included directly in the finished machine code - this can result in large executable program files.

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

Dynamic Linking

A

Compiled versions of the required libraries are stored on the host computer
OS links the required code from the library as the program is running
While this cuts down on the size of the complied machine code, if the dynamic libraries change the program may stop as it tries to call subroutines in the wrong way

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

Loader

A

The loader is the part of the OS that loads the executable file (machine code) into memory, ready to be run
When using dynamic linking, it will also be responsible for loading required libraries into memory

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