グローバルオフセットテーブルとは?
グローバルオフセットテーブル(GOT)は、動的リンカがグローバル変数や外部シンボルの実行時アドレスで埋めるテーブルです。位置独立コードは、命令に埋め込まれた絶対アドレスではなく、GOTを介して間接的にそれらのシンボルへ到達します。テーブルのエントリだけが変わるため、コード自体は読み取り専用のまま共有可能に保てます。
なぜ重要か
GOTは、共有ライブラリを再配置可能かつプロセス間で共有可能にする間接層です。動的シンボル解決や遅延バインディングの仕組みと密接に結び付いています。
関連ガイド
What Is the Procedure Linkage Table?The procedure linkage table is a stub table that routes calls to external functions, enabling their addresses…
What Is Position-Independent Code (PIC)?Position-independent code runs correctly regardless of the address it is loaded at, by addressing data and ca…
What Is Lazy Binding?Lazy binding defers resolving the address of an external function until the first time it is actually called,…