オブジェクトファイルとは?
オブジェクトファイルは、リンク前に単一のソース単位を機械コードへコンパイルした出力です。コードとデータのセクション、定義するものと必要とするもののシンボルテーブル、そしてまだ修正されていないアドレスのための再配置エントリを含みます。リンカは複数のオブジェクトファイルとライブラリを、最終的な実行ファイルや共有オブジェクトへ結合します。
なぜ重要か
個別のオブジェクトファイルへコンパイルすることで、大規模プロジェクトは変更された部分だけを再ビルドして残りをリンクでき、これが高速な増分ビルドの基礎となります。オブジェクト形式は、シンボルや再配置の問題が最初に現れる場所でもあります。
関連ガイド
What Is a Translation Unit?A translation unit is the complete source seen by the compiler after preprocessing one source file, the unit…
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 Symbol Resolution?Symbol resolution is the linker step that matches each reference to a name, such as a function or variable, w…