OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man8 / ld.so.8
index b808e23..6678d61 100644 (file)
@@ -1,10 +1,13 @@
+.\" %%%LICENSE_START(PUBLIC_DOMAIN)
 .\" This is in the public domain
+.\" %%%LICENSE_END
+.\"
 .\"*******************************************************************
 .\"
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LD.SO 8 2012\-04\-17 GNU "Linux Programmer's Manual"
+.TH LD.SO 8 2013\-07\-15 GNU "Linux Programmer's Manual"
 .SH 名前
 ld.so, ld\-linux.so* \- 動的なリンカ/ローダ
 .SH 書式
@@ -25,7 +28,11 @@ Linux のバイナリは、コンパイルの時に \fBld\fP(1)  に対して \f
 バイナリを扱う。 このフォーマットは多くの人が最近何年も使っている。 それ以外の点では両方とも同じように動作し、 同じサポートファイルとプログラム
 \fBldd\fP(1), \fBldconfig\fP(8), \fI/etc/ld.so.conf\fP を使用する。
 .LP
-プログラムで必要とされる共有ライブラリは、 以下の順序で検索される。
+ライブラリの依存関係を解決する際、動的リンカは、最初に、依存関係の各文字列がスラッシュを含んでいるかをチェックする
+(この状況になるのは、リンク時にスラッシュを含むライブラリのパス名が指定された場合である)。スラッシュが見つかった場合、その依存関係の文字列はパス名
+(相対パス、絶対パスのどちらも可) として解釈され、そのパス名を使ってそのライブラリはロードされる。
+.LP
+ライブラリの依存関係にスラッシュが含まれない場合、以下の順序で検索される。
 .IP o 3
 (ELF のみ)  バイナリの動的セクション属性 DT_RPATH が存在し、 DT_RUNPATH 属性が存在しない場合は、 DT_RPATH
 で指定されたディレクトリを使用する。 DT_RPATH の使用は推奨されない。
@@ -35,37 +42,48 @@ Linux のバイナリは、コンパイルの時に \fBld\fP(1)  に対して \f
 .IP o
 (ELF のみ)  バイナリの動的セクション属性 DT_RUNPATH が存在すれば、 DT_RUNPATH で指定されたディレクトリを使用する。
 .IP o
-キャッシュファイル \fI/etc/ld.so.cache\fP を探す。
-このファイルは、 (ld.so.conf で追加指定されたものも含めた) ライブラリ検索パスから
-見つかったライブラリファイルの情報を集めたものである。
-ただし、バイナリがリンカオプション \fB\-z nodeflib\fP でリンクされている場合は、
-デフォルトのライブラリパスにある ライブラリはスキップされる。
-ハードウェア機能ディレクトリ (下記参照) にインストールされたライブラリは、
-他のライブラリよりも優先される。
+キャッシュファイル \fI/etc/ld.so.cache\fP を探す。このファイルは、 (ld.so.conf で追加指定されたものも含めた)
+ライブラリ検索パスから見つかったライブラリファイルの情報を集めたものである。ただし、バイナリがリンカオプション \fB\-z nodeflib\fP
+でリンクされている場合は、デフォルトのライブラリパスにある ライブラリはスキップされる。ハードウェア機能ディレクトリ (下記参照)
+にインストールされたライブラリは、他のライブラリよりも優先される。
 .IP o
 デフォルトパスである \fI/lib\fP、 次いで \fI/usr/lib\fP を用いる。 バイナリがリンカオプション \fB\-z nodeflib\fP
 でリンクされている場合、このステップはスキップされる。
-.SS "$ORIGIN と rpath"
+.SS "Rpath token expansion"
 .PP
-.\" ld.so also understands $LIB, with the same meaning as $ORIGIN/lib,
-.\" it appears.
-.\"
-.\" There is also $PLATFORM.  This is a kind of wildcard
-.\" of directories related at AT_HWCAP.  To get an idea of the
-.\" places that $PLATFORM would match, look at the output of the
-.\" following:
+\fBld.so\fP understands certain strings in an rpath specification (DT_RPATH or
+DT_RUNPATH); those strings are substituted as follows
+.TP 
+\fI$ORIGIN\fP (or equivalently \fI${ORIGIN}\fP)
+This expands to the directory containing the application executable.  Thus,
+an application located in \fIsomedir/app\fP could be compiled with
+
+    gcc \-Wl,\-rpath,\(aq$ORIGIN/../lib\(aq
+
+so that it finds an associated shared library in \fIsomedir/lib\fP no matter
+where \fIsomedir\fP is located in the directory hierarchy.  This facilitates
+the creation of "turn\-key" applications that do not need to be installed
+into special directories, but can instead be unpacked into any directory and
+still find their own shared libraries.
+.TP 
+\fI$LIB\fP (or equivalently \fI${LIB}\fP)
+This expands to \fIlib\fP or \fIlib64\fP depending on the architecture (e.g., on
+x86\-64, it expands to \fIlib64\fP and on x86\-32, it expands to \fIlib\fP).
+.TP 
+\fI$PLATFORM\fP (or equivalently \fI${PLATFORM}\fP)
+.\" To get an idea of the places that $PLATFORM would match,
+.\" look at the output of the following:
 .\"
-.\" mkdir /tmp/d
-.\" LD_LIBRARY_PATH=/tmp/d strace -e open /bin/date 2>&1 | grep /tmp/d
+.\"     mkdir /tmp/d
+.\"     LD_LIBRARY_PATH=/tmp/d strace -e open /bin/date 2>&1 | grep /tmp/d
 .\"
 .\" ld.so lets names be abbreviated, so $O will work for $ORIGIN;
 .\" Don't do this!!
-\fBld.so\fP では、rpath 指定 (DT_RPATH や DT_RUNPATH) 中に \fI$ORIGIN\fP という文字列
-(\fI${ORIGIN}\fP も等価) を使うことができる。 \fI$ORIGIN\fP はアプリケーションの実行ファイルが入っているディレクトリを表す。
-これを使って \fIsomedir/app\fP に置かれたアプリケーションを \fIgcc \-Wl,\-rpath,'$ORIGIN/../lib'\fP
-でコンパイルすると、 \fIsomedir\fP がディレクトリ階層のどこにあっても、アプリケーションは \fIsomedir/lib\fP
-にある対応する共有ライブラリを見つけることができる。 この機能を使うと、 特別なディレクトリではなく任意のディレクトリにインストールしても
-"ややこしい設定なしで" 独自の共有ライブラリを使えるアプリケーションを作成することができる。
+This expands to a string corresponding to the processor type of the host
+system (e.g., "x86_64").  On some architectures, the Linux kernel doesn't
+provide a platform string to the dynamic linker.  The value of this string
+is taken from the \fBAT_PLATFORM\fP value in the auxiliary vector (see
+\fBgetauxval\fP(3)).
 .SH オプション
 .TP 
 \fB\-\-list\fP
@@ -114,24 +132,59 @@ flush, muldiv, stbar, swap, ultra3, v9, v9v, v9v2
 dfp, eimm, esan3, etf3enh, g5, highgprs, hpage, ldisp, msa, stfle, z900,
 z990, z9\-109, z10, zarch
 .TP 
-.TP 
 \fBx86 (32\-bit のみ)\fP
 acpi, apic, clflush, cmov, cx8, dts, fxsr, ht, i386, i486, i586, i686, mca,
 mmx, mtrr, pat, pbe, pge, pn, pse36, sep, ss, sse, sse2, tm
 .SH 環境変数
 4 つの重要な環境変数がある。
 .TP 
+\fBLD_ASSUME_KERNEL\fP
+(glibc since 2.2.3)  Each shared library can inform the dynamic linker of
+the minimum kernel ABI version that it requires.  (This requirement is
+encoded in an ELF note section that is viewable via \fIreadelf\ \-n\fP as a
+section labeled \fBNT_GNU_ABI_TAG\fP.)  At run time, the dynamic linker
+determines the ABI version of the running kernel and will reject loading
+shared libraries that specify minimum ABI versions that exceed that ABI
+version.
+
+\fBLD_ASSUME_KERNEL\fP can be used to cause the dynamic linker to assume that
+it is running on a system with a different kernel ABI version.  For example,
+the following command line causes the dynamic linker to assume it is running
+on Linux 2.2.5 when loading the shared libraries required by \fImyprog\fP:
+
+.in +4n
+.nf
+$ \fBLD_ASSUME_KERNEL=2.2.5 ./myprog\fP
+.fi
+.in
+
+On systems that provide multiple versions of a shared library (in different
+directories in the search path) that have different minimum kernel ABI
+version requirements, \fBLD_ASSUME_KERNEL\fP can be used to select the version
+of the library that is used (dependent on the directory search order).
+Historically, the most common use of the \fBLD_ASSUME_KERNEL\fP feature was to
+manually select the older LinuxThreads POSIX threads implementation on
+systems that provided both LinuxThreads and NPTL (which latter was typically
+the default on such systems); see \fBpthreads\fP(7).
+.TP 
+\fBLD_BIND_NOT\fP
+(glibc since 2.2)  Don't update the Global Offset Table (GOT) and Procedure
+Linkage Table (PLT)  when resolving a symbol.
+.TP 
 \fBLD_BIND_NOW\fP
 (libc5; glibc 2.1.1 以降)  空文字列でない場合、 動的リンカはプログラムの開始時に全てのシンボルを解決する。
 空文字列の場合、解決しなければならない関数呼び出しが 最初に参照された時点で解決する。 デバッガを使っているときに役立つ。
 .TP 
 \fBLD_LIBRARY_PATH\fP
-コロン区切りのディレクトリリスト。 実行時に ELF ライブラリを検索するディレクトリを指定する。 \fBPATH\fP 環境変数と同じように指定する。
+コロン区切りのディレクトリのリスト。実行時に ELF ライブラリを検索するディレクトリを指定する。 \fBPATH\fP 環境変数と同じように指定する。
+set\-user\-ID/set\-group\-ID されたプログラムでは無視される。
 .TP 
 \fBLD_PRELOAD\fP
-スペース区切りで ELF 共有ライブラリを指定する。 これはユーザーが指定でき、すべてのライブラリに先立ってロードされる。
-他の共有ライブラリにある関数を選択的に置き換えるために用いることができる。 set\-user\-ID/set\-group\-ID された ELF
-バイナリに対して、 標準的な検索パスにあるライブラリのうち set\-user\-ID されているものはロードしない。
+追加でユーザが指定する ELF
+共有ライブラリのリスト。指定されたライブラリは、すべてのライブラリより前にロードされる。リストの区切りはスペースとコロンである。他の共有ライブラリにある関数を選択的に置き換えるために用いることができる。指定されたライブラリは「説明」の節で述べたルールを基いて検索される。
+set\-user\-ID/set\-group\-ID された ELF
+バイナリでは、スラッシュを含んだパス名のライブラリは無視され、標準の検索ディレクトリのライブラリはそのライブラリファイルの set\-user\-ID
+許可ビットが有効になっている場合のみロードされる。
 .TP 
 \fBLD_TRACE_LOADED_OBJECTS\fP
 (ELF のみ)  空文字列でない場合、 プログラムを普通に実行するのではなく、 \fBldd\fP(1)
@@ -170,8 +223,9 @@ linkage table) を更新しない。
 set\-user\-ID/set\-group\-ID されたバイナリでは \fBLD_DEBUG\fP は無視される。
 .TP 
 \fBLD_DEBUG_OUTPUT\fP
-(glibc 2.1 以降)  \fBLD_DEBUG\fP の出力を書き込むファイル。 デフォルトは標準出力である。
-set\-user\-ID/set\-group\-ID されたバイナリでは、 \fBLD_DEBUG_OUTPUT\fP は無視される。
+(glibc since 2.1)  File in which \fBLD_DEBUG\fP output should be written.  The
+default is standard output.  \fBLD_DEBUG_OUTPUT\fP is ignored for
+set\-user\-ID/set\-group\-ID binaries.
 .TP 
 \fBLD_DYNAMIC_WEAK\fP
 (glibc 2.1.19 以降)  上書きされる弱いシンボル (昔の glibc の挙動を逆にする)。 セキュリティ上の理由から、glibc
@@ -228,9 +282,9 @@ set\-user\-ID/set\-group\-ID されたプログラムでは、 LD_PROFILE_OUTPUT
 されたプログラムでは、 この変数は無視される。
 .TP 
 \fBLD_VERBOSE\fP
-(glibc 2.1 以降)  空文字列でない場合に、 (\fBLD_TRACE_LOADED_OBJECTS\fP を設定するか、 \fB\-\-list\fP
-または \fB\-\-verify\fP オプションを動的リンカに指定することにより)  プログラムについての情報を問い合わせると、
-プログラムのシンボルバージョン情報を表示する。
+(glibc since 2.1)  If set to a nonempty string, output symbol versioning
+information about the program if the \fBLD_TRACE_LOADED_OBJECTS\fP environment
+variable has been set.
 .TP 
 \fBLD_WARN\fP
 (ELF のみ)(glibc 2.1.3 以降)  空文字列でない場合、解決されていないシンボルがあれば警告を出す。
@@ -265,8 +319,8 @@ Linux 1.1.52 以降と libc5 以降で使用可能である。
 .\" ld-linux.so: Roland McGrath, Ulrich Drepper and others.
 .\"
 .\" In the above, (libc5) stands for David Engel's ld.so/ld-linux.so.
-\fBldd\fP(1), \fBrtld\-audit\fP(7), \fBldconfig\fP(8)
+\fBldd\fP(1), \fBsln\fP(1), \fBgetauxval\fP(3), \fBrtld\-audit\fP(7), \fBldconfig\fP(8)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。