最終更新:2019-09-27 (金) 18:20:07 (1697d)  

ldconfig
Top / ldconfig

動的リンカによる実行時の結合関係を設定する

configure dynamic linker run-time bindings

概要

  • ldcofig は最新の共有ライブラリに対して必要なリンクを作成したり、 ライブラリをキャッシュしたりする (キャッシュは実行時リンカ ld.sold-linux.so が用いる)。
  • ライブラリは、コマンドラインや Linux/etc/ld.so.conf ファイルで指定されたディレクトリや、共有ライブラリが 通常置かれるディレクトリ (/usr/lib/lib) から検索される。
  • ldconfig は処理するライブラリのヘッダ部分とファイル名をチェックし、 どのバージョンに対してリンクを更新すべきかを判断する。
  • ldconfig はライブラリを検索するときシンボリックリンクを無視する。

メモ

  • ldconfig は、既に存在するファイルを調べ、real name へのシンボリックリンクとして soname 群を作成します。
  • 同様にして、キャッシュファイル Linux/etc/ld.so.cache? も作成します
  • ldconfigはsonameを作ってはくれるがlinker nameは作ってくれない

引数

ldconfig -v

  • Verbose mode.
  • Print current version number, the name of each directory as it is scanned, and any links that are created.
  • Overrides quiet mode.

ldconfig -p

  • Print the lists of directories and candidate libraries stored in the current cache.

動的リンカ

Mac OS X

設定