動的リンクとは?
動的リンクは、実行ファイル内のライブラリ参照を未解決のまま残し、ロード時または実行時に target システムに存在する共有ライブラリに結び付けます。バイナリは小さいままで、多くのプログラムがメモリ内でライブラリの単一のコピーを共有します。プログラムが動作する場所に正しいバージョンのライブラリがインストールされている必要があります。
なぜ重要か
動的リンクはバイナリを小さく保ち、共有ライブラリへのセキュリティ修正を、それを使うすべてのプログラムに再構築なしで反映できます。その代償は deploy の脆さです。欠落または不一致の共有ライブラリという古典的な dependency-hell の問題は、プログラムの動作を妨げます。
関連する概念
- static linking の対義
- ライブラリの更新はプログラムを再構築せずに適用される
- 欠落または不一致のライブラリは実行時に破綻する
関連ガイド
What Is Static Linking?Static linking bundles a program's library dependencies directly into the executable at build time, producing…
What Is a Distroless Image?A distroless image contains only your application and its runtime dependencies, with no shell, package manage…
What Is a Transitive Dependency?A transitive dependency is one you do not require directly but pull in indirectly because a dependency of you…