O'Reilly logo

The Linux Programming Interface by Michael Kerrisk

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 42. Advanced Features of Shared Libraries

The previous chapter covered the fundamentals of shared libraries. This chapter describes a number of advanced features of shared libraries, including the following:

  • dynamically loading shared libraries;

  • controlling the visibility of symbols defined by a shared library;

  • using linker scripts to create versioned symbols;

  • using initialization and finalization functions to automatically execute code when a library is loaded and unloaded;

  • shared library preloading; and

  • using LD_DEBUG to monitor the operation of the dynamic linker.

Dynamically Loaded Libraries

When an executable starts, the dynamic linker loads all of the shared libraries in the program’s dynamic dependency list. Sometimes, however, it can be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required