Linkers, Loaders and Shared Libraries in Windows, Linux, and C++
summary
Explains concrete differences: Windows uses an IAT and explicit imports so symbols cannot be interposed and delay‑load is off by default, Linux uses a GOT and PLT plus breadth‑first search so interposition and lazy binding are possible. Recommends build flags: -fvisibility=hidden, -Bsymbolic and -zrelro/-znow (or DZLAZY tradeoffs). Cites numbers: Python gained ~1.3x speedup by blocking interposition; compilers report up to 30% max (≈1% average) from devirtualization. Describes how function pointers, PIC and ELF resolver stubs actually behave.
AI-written summary · about
chapters (10)
- 0:00Introduction to linking
- 1:06Linking and loading basics
- 6:50Windows vs. Linux linking
- 9:50Interposition and symbol binding
- 24:23Position independent code
- 32:31Lazy binding mechanics
- 33:48Function pointer comparison
- 36:39Visibility and security
- 45:19Best practices and conclusions
- 51:10Q&A session
related talks
55mDynamically Loaded Libraries Outside the Standard
01h 02mC++ Shared Libraries and Where To Find Them
01h 00mThe Power and Pain of Hidden Symbols in C++ Programming
16mMind the Gap (Between Your Code and Your Toolchain)
05mClang on Windows: It's a Thing
01h 00mThe Hitchhiker's Guide to Faster Builds
06mRpath and binary reuse
19mLuci: Loader-based Dynamic Software Updates for Off-the-shelf Shared Objects
