OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / uselib.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified by Michael Haardt <michael@moria.de>
26 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified 1996-10-22 by Eric S. Raymond <esr@thyrsus.com>
28 .\" Modified 2004-06-23 by Michael Kerrisk <mtk16@ext.canterbury.ac.nz>
29 .\" Modified 2005-01-09 by aeb
30 .\"
31 .\" Japanese Version Copyright (c) 1997 SUTO Mitsuaki
32 .\"         all rights reserved.
33 .\" Translated 1997-06-26, SUTO Mitsuaki <suto@av.crl.sony.co.jp>
34 .\" Updated 2000-01-13,Kentaro Shirakata <argrath@yo.rim.or.jp>
35 .\" Updated 2005-02-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
36 .\" Updated 2005-04-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
37 .\"
38 .\"WORD:        Linux-specific          Linux ÆÃÍ­
39 .\"
40 .TH USELIB 2 2005-01-09 "Linux" "Linux Programmer's Manual"
41 .\"O .SH NAME
42 .SH Ì¾Á°
43 .\"O uselib \- select shared library
44 uselib \- ¶¦Í­¥é¥¤¥Ö¥é¥ê¤òÁªÂò¤¹¤ë
45 .\"O .SH SYNOPSIS
46 .SH ½ñ¼°
47 .B #include <unistd.h>
48 .sp
49 .BI "int uselib(const char *" library );
50 .\"O .SH DESCRIPTION
51 .SH ÀâÌÀ
52 .\"O The system call
53 .\"O .BR uselib ()
54 .\"O serves to load
55 .\"O a shared library to be used by the calling process.
56 .\"O It is given a pathname.
57 .\"O The address where to load is found
58 .\"O in the library itself.
59 .\"O The library can have any recognized
60 .\"O binary format.
61 ¥·¥¹¥Æ¥à¥³¡¼¥ë
62 .BR uselib ()
63 ¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤¬»ÈÍѤ¹¤ë
64 ¶¦Í­¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤¹¤ëºÝ¤Ë»ÈÍѤµ¤ì¤ë¡£
65 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ë¤Ï¥é¥¤¥Ö¥é¥ê¤Î¥Ñ¥¹Ì¾¤ò»ØÄꤹ¤ë¡£
66 ¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤¹¤ë¥¢¥É¥ì¥¹¤Ï¥é¥¤¥Ö¥é¥ê¼«¿È¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¡£
67 ¥é¥¤¥Ö¥é¥ê¤Ïǧ¼±²Äǽ¤Ê¥Ð¥¤¥Ê¥ê·Á¼°¤Ç¤¢¤ì¤Ð¤É¤ó¤Ê·Á¼°¤Ç¤â¤è¤¤¡£
68 .\"O .SH "RETURN VALUE"
69 .SH ÊÖ¤êÃÍ
70 .\"O On success, zero is returned.
71 .\"O On error, \-1 is returned, and
72 .\"O .I errno
73 .\"O is set appropriately.
74 À®¸ù¤·¤¿¾ì¹ç 0 ¤òÊÖ¤¹¡£¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤òÊÖ¤·¡¢
75 .I errno
76 ¤ò¥¨¥é¡¼¤ÎÆâÍƤ˽¾¤Ã¤ÆÀßÄꤹ¤ë¡£
77 .\"O .SH ERRORS
78 .SH ¥¨¥é¡¼
79 .\"O In addition to all of the error codes returned by
80 .\"O .BR open (2)
81 .\"O and
82 .\"O .BR mmap (2),
83 .\"O the following may also be returned:
84 .BR open (2)
85 ¤È
86 .BR mmap (2)
87 ¤¬ÊÖ¤¹¥¨¥é¡¼¥³¡¼¥É¤Ë²Ã¤¨¤Æ¡¢°Ê²¼¤Î¥¨¥é¡¼¥³¡¼¥É¤¬ÀßÄꤵ¤ì¤ë¤³¤È¤¬¤¢¤ë¡£
88 .TP
89 .B EACCES
90 .\"O The library specified by
91 .\"O .I library
92 .\"O does not have read or execute permission, or the caller does not have
93 .\"O search permission for one of the directories in the path prefix.
94 .\"O (See also
95 .\"O .BR path_resolution (7).)
96 .I library
97 ¤Ç»ØÄꤵ¤ì¤¿¥é¥¤¥Ö¥é¥ê¤ËÂФ¹¤ëÆɤ߹þ¤ßµö²Ä¡¢¤Þ¤¿¤Ï¼Â¹Ôµö²Ä¤¬¤Ê¤¤¡£
98 ¤â¤·¤¯¤Ï
99 .I library
100 ¤¬Â¸ºß¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤½¤Î¾å°Ì¤Î¤¤¤º¤ì¤«¤ËÂФ¹¤ë¸¡º÷µö²Ä¤¬¤Ê¤¤
101 .RB ( path_resolution (7)
102 ¤â»²¾È)¡£
103 .TP
104 .B ENFILE
105 .\"O The system limit on the total number of open files has been reached.
106 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ÎÁí¿ô¤¬¥·¥¹¥Æ¥àÁ´ÂΤξå¸Â¤Ë㤷¤¿¡£
107 .TP
108 .B ENOEXEC
109 .\"O The file specified by
110 .\"O .I library
111 .\"O is not an executable of known type,
112 .\"O e.g., does not have the correct magic numbers.
113 .I library
114 ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬¡¢¼Â¹Ô²Äǽ¥Õ¥¡¥¤¥ë¤Èǧ¼±¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¼ïÊ̤ǤÏ
115 ¤Ê¤¤¡¢¤Ä¤Þ¤êÀµ¤·¤¤¥Þ¥¸¥Ã¥¯¡¦¥Ê¥ó¥Ð¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Ê¤¤¡£
116 .\"O .SH "CONFORMING TO"
117 .SH ½àµò
118 .\"O .BR uselib ()
119 .\"O is Linux-specific, and should not be used in programs
120 .\"O intended to be portable.
121 .BR uselib ()
122 ¤Ï Linux ÆÃÍ­¤Î´Ø¿ô¤Ç¤¢¤ê¡¢°Ü¿¢À­¤ò»ý¤¿¤»¤¿¤¤¥×¥í¥°¥é¥à
123 ¤Ë¤Ï»ÈÍѤ¹¤Ù¤­¤Ç¤Ê¤¤¡£
124 .\"O .SH NOTES
125 .SH Ãí°Õ
126 .\"O .BR uselib ()
127 .\"O was used by early libc startup code to load
128 .\"O the shared libraries with names found in an array of names
129 .\"O in the binary.
130 ½é´ü¤Î libc ¤Îµ¯Æ°¥³¡¼¥É¤Ï¡¢
131 .BR uselib ()
132 ¤ò»È¤Ã¤Æ¡¢
133 ¥Ð¥¤¥Ê¥êÃæ¤Î¥ê¥¹¥È¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¶¦Í­¥é¥¤¥Ö¥é¥ê¤ò
134 ¥ê¥¹¥ÈÃæ¤Î¤½¤Î¤Þ¤Þ¤Î̾Á°¤Ç¥í¡¼¥É¤·¤Æ¤¤¤¿¡£
135 .LP
136 .\" libc 4.3.1f - changelog 1993-03-02
137 .\"O Since libc 4.3.2, startup code tries to prefix these names
138 .\"O with "/usr/lib", "/lib" and "" before giving up.
139 libc 4.3.2 °Ê¹ß¤Ç¤Ï¡¢¤³¤ì¤é¤Î̾Á°¤ÎÁ°¤Ë "/usr/lib", "/lib", "" ¤ò
140 ¤Ä¤±¤Æ¶¦Í­¥é¥¤¥Ö¥é¥ê¤òõ¤¹¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
141 .\" libc 4.3.4 - changelog 1993-04-21
142 .\"O In libc 4.3.4 and later these names are looked for in the directories
143 .\"O found in
144 .\"O .BR LD_LIBRARY_PATH ,
145 .\"O and if not found there,
146 .\"O prefixes "/usr/lib", "/lib" and "/" are tried.
147 libc 4.3.4 °Ê¹ß¤Ç¤Ï¡¢¤³¤ì¤é¤Î̾Á°¤Î¶¦Í­¥é¥¤¥Ö¥é¥ê¤ò¤Þ¤º
148 .B LD_LIBRARY_PATH
149 ¤Ç»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Çõ¤·¡¢¸«¤Ä¤«¤é¤Ê¤±¤ì¤Ð¡¢
150 ̾Á°¤ÎÁ°¤Ë "/usr/lib", "/lib", "/" ¤ò¤Ä¤±¤Æõ¤¹¡£
151 .LP
152 .\"O From libc 4.4.4 on only the library "/lib/ld.so" is loaded,
153 .\"O so that this dynamic library can load the remaining libraries needed
154 .\"O (again using this call).
155 .\"O This is also the state of affairs in libc5.
156 libc 4.4.4 °Ê¹ß¤Ç¤Ï¡¢¥é¥¤¥Ö¥é¥ê "/lib/ld.so" ¤À¤±¤¬¥í¡¼¥É¤µ¤ì¡¢¤½¤Î¸å¤Ç
157 ¤³¤ÎưŪ¥é¥¤¥Ö¥é¥ê¤¬ (¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò¤â¤¦°ìÅٻȤäÆ)
158 ɬÍפʻĤê¤Î¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
159 .LP
160 .\"O glibc2 does not use this call.
161 glibc2 ¤Ï¡¢¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»ÈÍѤ·¤Ê¤¤¡£
162 .\"O .SH "SEE ALSO"
163 .SH ´ØÏ¢¹àÌÜ
164 .BR ar (1),
165 .BR gcc (1),
166 .BR ld (1),
167 .BR ldd (1),
168 .BR mmap (2),
169 .BR open (2),
170 .BR dlopen (3),
171 .BR capabilities (7),
172 .BR ld.so (8)