linkers, loaders and libraries Flashcards
what is a library and what form do they come in
ready- compiled and tested programs that can be run when needed, they can come in the form of pre-built functions (.remainder)
a DLL is a library that contains …
sub routines written to carry out a common task on the Windows OS (Save As)
the benefits of libraries …(3)
- quick to implement into you own code
- pre-tested , so so you are sure that they are free from errors
- pre- compiled which means they are typically optimized
drawbacks of libraries … (2)
- making specific tweaks can be difficult/impssible
- you have to trust that the developers will continue to maintain the library
what is a linker
a piece of software that links external modules(code) and libraries within the code
the two types of linkers are …
static linking
dynamic linking
static liking works by including …
all the required code from libraries in the finished machine code
dynamic linking(2)
- compiled versions of libraries are stored on the host computer
- the OS links the required code from the library as the program is running
the advantage of dynamic linking is …
reduced size of compiled machine code
the disadvantage of dynamic linking is if …
libraries change/don’t exist the program will stop working as it may try to call the subroutine in the wrong way
a loader is a part of the OS that loads…
the executable program file(machine code) into memory (RAM) for execution