Creating and Using Shared Libraries on Linux course outline
- Course Introduction
- Fundamentals of Shared Libraries
- Background
- The static linker and the dynamic linker
- Static vs shared libraries
- Basics of shared library creation and use
- The shared library soname
- Summary: library creation, linking, and loading
- Versioning & Installation
- Shared library versioning
- Shared library real names, sonames, and linker names
- Installing shared libraries
- ldconfig
- Constructors and destructors
- The Dynamic Linker
- Rpath: specifying library search paths in an object
- Dynamic string tokens
- Finding shared libraries at run time
- Symbol resolution, interposition, and link maps
- Debugging the operation of the dynamic linker
- Shared Libraries and the Static Linker
- Recording dynamic dependencies
- Handling secondary dependencies at link time
- How the static linker finds library dependencies
- ELF and Program Execution (*)
- ELF file layout
- ELF sections
- Useful commands: readelf and objdump
- How programs get run
- Dynamically Loaded Libraries (dlopen)
- Opening a shared library: dlopen()
- Obtaining the address of a symbol: dlsym()
- The dlopen API: example
- The dlopen API: further details
- Symbol Visibility
- Controlling symbol visibility
- Using version scripts to control symbol visibility
- Preloading shared libraries
- Weak symbols (*)
- Symbol Versioning
- Creating a symbol-versioned library
- Advantages of symbol versioning
- Symbol versioning: further details
- Transitioning an existing library to symbol versioning
- Lazy Binding (*)
- GOTand PLT (*)
- The GOT and PLT
- Relocation and the PLT: in pictures
- Relocation and the PLT: code
- Observing the effect of lazy binding on the GOT
- Performance considerations
Return to the course overview