Libraries, Linkers & Loaders (OCR A-Level Computer Science): Flashcards

📚Flashcards
Libraries, Linkers & Loaders
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

13 cards from this deck

Show

Library (definition)

Collection of precompiled code for common tasks

Static library

Library included directly in executable at compilation

Dynamic library (shared library)

Library linked at runtime as separate file

Benefit of libraries: efficiency

Allows reuse of pre-written code, speeds up development

Benefit of libraries: reliability

Library code is often tested & optimised, reducing bugs

Drawback: dependency management

Dynamic library programs may fail if library missing or incompatible

Linker (definition)

Tool combining code & data files into single executable

Static linking

Includes all library functions in executable at compile time

Dynamic linking

Includes only references to libraries, links at runtime

What linker searches for in code

Symbols (functions/variables) to ensure they're defined

Loader (definition)

OS part loading executable into memory & starting execution

Loader's role with dynamic libraries

Finds & links necessary libraries when program runs

Error when linker can't find symbol

Unresolved symbol error, prevents successful compilation

Join 100,000+ A-Level students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.