Preview

09 - Linkers, Loaders and use of libraries

 1. In programming, what is a module?

  Part of a program

  A hardware device that can be added to a computer

  Bespoke code that is uniquely written for each situation

  A statement that allows code to be repeatedly executed

 2. Ideally, modules should be …

  repetitive

  similar

  self-contained

  dependent on each other

 3. What would a programmer find in a library?
linkersandloaders_q3.jpg

  Guidebooks on the best way to write code

  A table to convert source code into binary

  A collection of modules that can be used by or included in a program

  An index of memory locations in which data can be stored

 4. In MS Windows, a library is called a ...

  dynamic link library (DLL)

  linking dynamic library (LDL)

  literary dynamic library (LDL)

  linked library driver (LLD)

 5. Content from a library can be incorporated into a compiled programe or 'called' as an external file.

  TRUE

  FALSE

 6. Which of these options are advantages of using libraries:
1. Dynamic linking means less code has to be loaded into memory
2. Different programs can use the same modules
3. A programmer can save time by using existing code
4. The library modules should have already been tested 
5. If there is an error in the library it won't affect any programs

  1 and 3

  1, 3 and 4

  1, 2, 3 and 4

  All of these options

 7. What is a linker?

  A cable that transfers data around the computer

  A program that combines modules to form an executable program

  A program that converts high level language into assembly language

  A program that moves data between RAM and the hard drive

 8. Linkers can combine object files and objects from ______ .

  deposits

  mines

  archives

  libraries

 9. A linkage editor makes a relocatable executable program. A dynamic linker waits until load time or run time to make an executable program.

  FALSE

  TRUE

 10. What is the file usually called that tells a compiler how to compile and link a program?

  Linkfile

  Editfile

  Compilefile

  Makefile

 11. The ________ _______ made by the linker is then loaded into main memory by the loader.
linkersandloaders_q11.png

  assembly code

  source code

  executable program

  high-level language

 12. The loader is part of the operating system (OS).

  TRUE

  FALSE

 13. Absolute loading uses ___ ____ main memory location each time.

  a random

  the same

  a sequential

  a different

 14. Relocatable loading uses relative addresses and ______ main memory locations may be used each time.

  identical

  different

  reverse

  sequential

 15. Dynamic run-time loading generates an absolute address when an instruction is actually ________.

  compiled

  translated

  executed

  typed