P93

Static link:

  • If a copy of the library is a physical part of the executable, it is called a static link.
  • In static linking, the entire file is not loaded into the executable, only the required functions are loaded.

Dynamic linking:

  • If the executable simply contains the file name, allowing the loader to find the library of functions needed by the program at run time, then this is called dynamic linking.
  • Even if the library is linked, there is no additional overhead if it is not actually called.
  • Dynamic linking allows the size of executable files to be very small. It runs slightly slower, but uses disk space more efficiently.
  • All executables dynamically linked to a particular library share a single copy of that library at run time.
  • Dynamic linking makes library versioning easier because it separates the program from the library version. Instead, the system provides an interface to the program that is stable over time and does not change with subsequent versions of the operating system.

P102

interpsitioning:

  • Interpsitioning is the substitution of a library function by writing a function with the same name as the library function.
  • To quote the book, we have yet to see a convincing case of an effect that can only be effectively accomplished by Interpsitioning and not by any other means. So do not use interpsitioning in your program.
  • The harm brought about by one interpsitioning is listed on page 102.