シンボル解決とは?
シンボル解決は、リンカが結合される複数のオブジェクトファイルやライブラリにわたって、名前付き関数やグローバル変数の各使用箇所を正確に1つの定義へ結び付けるプロセスです。未解決の参照は未定義シンボルエラーを生み、同じシンボルの定義が2つあると重複シンボルエラーを引き起こします。解決されたシンボルには、後で最終アドレスが割り当てられます。
なぜ重要か
リンク時のビルド失敗のほとんどは、欠落しているか二重に定義されたシンボルに帰着します。解決を理解すれば、難解なリンカエラーが、正しいオブジェクトやライブラリを探す明確な作業へと変わります。
関連ガイド
What Is a Relocation Table?A relocation table lists the places in an object file whose addresses must be patched once the final load add…
What Is a Static Library?A static library is an archive of object files whose needed code is copied directly into an executable at lin…
What Is a Dynamic Linker?A dynamic linker loads the shared libraries a program depends on at startup and binds its references to the f…