Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Includes 'real teacher' use videos.

Linkers, Loaders and use of libraries

Blast from the past - the use of a linker

Linkers

The purpose of a linker is to include the code used from any libraries into the final program. They can be either static or dynamic; static linkers incorporate the code directly into the executable, which can dramatically increase its size. Dynamic linkers link to the code only when it is run, as it is stored on the programs computer, thus reducing the size of the executable.

Loaders

Loaders are a part of the operating system responsible for loading a program and its dependencies (such as dynamically linked libraries) into memory. It handles the addresses when the program is run.

Libraries

Libraries contain pre-written code which can be accessed and run by programs. They allow developers to use pre-written and pre-tested code, that is often designed to handle complex tasks such as graphics or cryptography, which often require a certain level of expert knowledge.They are accessed and used through an Application Programming Interface (API).

Library routines are examples of these pieces or pre-written code.They are pre-compiled and error free, and as such are ready to use, reducing work and time required when programming. They can be used multiple times, and many have been written in a different source language. It allows the programmer to make use of other peoples expertise, meaning you won't end up 'reinventing the wheel' unnecessarily.

www.teachyourselfpython.com