.\" Copyright 1995-2000 David Engel (david@ods.com) .\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu) .\" Copyright 2000 Ben Collins (bcollins@debian.org) .\" Redone for GLibc 2.2 .\" Copyright 2000 Jakub Jelinek (jakub@redhat.com) .\" Corrected. .\" Most of this was copied from the README file. .\" .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) .\" Do not restrict distribution. .\" May be distributed under the GNU General Public License .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved. .\" Translated Sat May 23 1998 by NAKANO Takeo .\" Updated & Modified Wed Jan 6 1999 by NAKANO Takeo .\" Updated & Modified Wed Jan 16 21:05:41 JST 2002 .\" by Yuichi SATO .\" Updated 2013-05-04, Akihiro MOTOKI .\" .TH LDD 1 2014\-10\-02 "" "Linux Programmer's Manual" .SH 名前 ldd \- 共有ライブラリへの依存関係を表示する .SH 書式 \fBldd\fP [\fIoption\fP]... \fIfile\fP... .SH 説明 \fBldd\fP はコマンドラインで指定したプログラムや共有ライブラリについて、 それぞれで必要とされる共有ライブラリを表示する。 .SS セキュリティ .\" Mainline glibc's ldd allows this possibility (the line .\" try_trace "$file" .\" in glibc 2.15, for example), but many distro versions of .\" ldd seem to remove that code path from the script. 通常の場合、 \fBldd\fP は標準の動的リンカー (\fBld.so\fP(8) 参照) を \fBLD_TRACE_LOADED_OBJECTS\fP 環境変数に 1 をセットして起動する。 \fBLD_TRACE_LOADED_OBJECTS\fP に 1 をセットすると、リンカーはライブラリの依存関係を表示する。但し、状況次第では、依存関係の情報を得るのにプログラムを直接実行するバージョンの \fBldd\fP が存在する。したがって、信頼できない実行ファイルに対しては「決して」 \fBldd\fP を使っては「ならない」。任意のコードを実行することにつながるからである。信頼できない実行ファイルを扱う、より安全な別の方法としては次のようにするとよい。 $ objdump \-p /path/to/program | grep NEEDED .SH オプション .TP \fB\-\-version\fP \fBldd\fP のバージョン番号を表示する。 .TP \fB\-v\ \-\-verbose\fP シンボルのバージョン情報などを含めた全ての情報を表示する。 .TP \fB\-u\ \-\-unused\fP 使用されていない直接の依存関係を表示する (glibc 2.3.4 以降)。 .TP \fB\-d\ \-\-data\-relocs\fP リロケーションを実行し、足りないオブジェクトについてレポートする (ELF のみ)。 .TP \fB\-r\ \-\-function\-relocs\fP 足りないオブジェクトや関数についてレポートする (ELF のみ)。 .TP \fB\-\-help\fP .\" .SH NOTES .\" The standard version of .\" .B ldd .\" comes with glibc2. .\" Libc5 came with an older version, still present .\" on some systems. .\" The long options are not supported by the libc5 version. .\" On the other hand, the glibc2 version does not support .\" .B \-V .\" and only has the equivalent .\" .BR \-\-version . .\" .LP .\" The libc5 version of this program will use the name of a library given .\" on the command line as-is when it contains a \(aq/\(aq; otherwise it .\" searches for the library in the standard locations. .\" To run it .\" on a shared library in the current directory, prefix the name with "./". 使用法を表示する。 .SH バグ \fBldd\fP は a.out 共有ライブラリでは動作しない。 .PP .\" .SH AUTHOR .\" David Engel. .\" Roland McGrath and Ulrich Drepper. \fBldd\fP は非常に古い a.out プログラム (\fBldd\fP のサポートがコンパイラに追加される以前にビルドされたようなプログラム) では動作しない。 このようなプログラムに対して \fBldd\fP を用いると、プログラムは \fIargc\fP = 0 で実行される。結果は予想不可能である。 .SH 関連項目 \fBsprof\fP(1), \fBpldd\fP(1), \fBld.so\fP(8), \fBldconfig\fP(8) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。