OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / get_kernel_syms.2
1 .\" Copyright (C) 1996 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
4 .\"
5 .\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
6 .\" reformatting and rewordings by mtk
7 .\"
8 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
9 .\" Translated 2006-07-31, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
10 .\"
11 .TH GET_KERNEL_SYMS 2 2007-06-03 "Linux" "Linux Programmer's Manual"
12 .\"O .SH NAME
13 .SH Ì¾Á°
14 .\"O get_kernel_syms \- retrieve exported kernel and module symbols
15 get_kernel_syms \- ¸ø³«¤µ¤ì¤Æ¤¤¤ë¥«¡¼¥Í¥ë¤ä¥â¥¸¥å¡¼¥ë¤Î¥·¥ó¥Ü¥ë¤Î¼èÆÀ
16 .\"O .SH SYNOPSIS
17 .SH ½ñ¼°
18 .nf
19 .B #include <linux/module.h>
20 .sp
21 .BI "int get_kernel_syms(struct kernel_sym *" table );
22 .fi
23 .\"O .SH DESCRIPTION
24 .SH ÀâÌÀ
25 .\"O If
26 .\"O .I table
27 .\"O is NULL,
28 .\"O .BR get_kernel_syms ()
29 .\"O returns the number of symbols available for query.
30 .\"O Otherwise it fills in a table of structures:
31 .BR get_kernel_syms ()
32 ¤Ï¡¢
33 .I table
34 ¤¬ NULL ¤Î¾ì¹ç¡¢
35 Ì䤤¹ç¤ï¤»¤Ç¤­¤ë¥·¥ó¥Ü¥ë¤Î¿ô¤òÊÖ¤¹¡£
36 NULL °Ê³°¤Î¾ì¹ç¡¢°Ê²¼¤Î¹½Â¤ÂΤÎÎó (table) ¤ËÃͤòÆþ¤ì¤ÆÊÖ¤¹¡£
37 .PP
38 .in +4n
39 .nf
40 struct kernel_sym {
41     unsigned long value;
42     char          name[60];
43 };
44 .fi
45 .in
46 .PP
47 .\"O The symbols are interspersed with magic symbols of the form
48 .\"O .BI # module-name
49 .\"O with the kernel having an empty name.
50 .\"O The value associated with a symbol of this form is the address at
51 .\"O which the module is loaded.
52 ¥·¥ó¥Ü¥ë¤ÎÃæ¤Ë¤Ï¡¢
53 .BI # module-name
54 ¤È¤¤¤¦·Á¼°¤Î¡¢¥«¡¼¥Í¥ë¤¬¶õ¤Î̾Á°¤ò»ý¤Ã¤Æ¤¤¤ë¥Þ¥¸¥Ã¥¯¥·¥ó¥Ü¥ë
55 (magic symbol) ¤¬»¶ºß¤·¤Æ¤¤¤ë¡£¤³¤Î·Á¼°¤Î¥·¥ó¥Ü¥ë¤ËÂбþ¤¹¤ëÃͤÏ
56 ¥â¥¸¥å¡¼¥ë¤¬¥í¡¼¥É¤µ¤ì¤¿¥¢¥É¥ì¥¹¤È¤Ê¤ë¡£
57 .PP
58 .\"O The symbols exported from each module follow their magic module tag
59 .\"O and the modules are returned in the reverse of the
60 .\"O order in which they were loaded.
61 ¸Ä¡¹¤Î¥â¥¸¥å¡¼¥ë¤«¤é¸ø³« (export) ¤µ¤ì¤¿¥·¥ó¥Ü¥ë¤Ï¡¢¥Þ¥¸¥Ã¥¯¥â¥¸¥å¡¼¥ë¥¿¥°
62 ¤Î¸å¤í¤ËÃÖ¤«¤ì¤ë¡£¤Þ¤¿¡¢¥â¥¸¥å¡¼¥ë¤Ï¥í¡¼¥É¤µ¤ì¤¿½çÈ֤Ȥϵսç¤ÇÊÖ¤µ¤ì¤ë¡£
63 .\"O .SH "RETURN VALUE"
64 .SH ÊÖ¤êÃÍ
65 .\"O On success, returns the number of symbols copied to
66 .\"O .IR table .
67 .\"O On error, \-1 is returned and
68 .\"O .I errno
69 .\"O is set appropriately.
70 À®¸ù¤¹¤ë¤È¡¢
71 .I table
72 ¤Ë¥³¥Ô¡¼¤µ¤ì¤¿¥·¥ó¥Ü¥ë¿ô¤òÊÖ¤¹¡£
73 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
74 .I errno
75 ¤òŬÀÚ¤ËÀßÄꤹ¤ë¡£
76 .\"O .SH ERRORS
77 .SH ¥¨¥é¡¼
78 .\"O There is only one possible error return:
79 ÊÖ¤ë²ÄǽÀ­¤¬¤¢¤ë¥¨¥é¡¼¤Ï°ì¤Ä¤À¤±¤Ç¤¢¤ë¡£
80 .TP
81 .B ENOSYS
82 .\"O .BR get_kernel_syms ()
83 .\"O is not supported in this version of the kernel.
84 .BR get_kernel_syms ()
85 ¤¬¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
86 .\"O .SH VERSIONS
87 .SH ¥Ð¡¼¥¸¥ç¥ó
88 .\"O This system call is only present on Linux up until kernel 2.4;
89 .\"O it was removed in Linux 2.6.
90 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬Â¸ºß¤¹¤ë¤Î¤Ï¥«¡¼¥Í¥ë 2.4 ¤Þ¤Ç¤Î Linux ¤À¤±¤Ç¤¢¤ë¡£
91 Linux 2.6 ¤Ç¤Ïºï½ü¤µ¤ì¤¿¡£
92 .\" Removed in Linux 2.5.48
93 .\"O .SH "CONFORMING TO"
94 .SH ½àµò
95 .\"O .BR get_kernel_syms ()
96 .\"O is Linux-specific.
97 .BR get_kernel_syms ()
98 ¤Ï Linux ¸ÇÍ­¤Ç¤¢¤ë¡£
99 .\"O .SH BUGS
100 .SH ¥Ð¥°
101 .\"O There is no way to indicate the size of the buffer allocated for
102 .\"O .IR table .
103 .\"O If symbols have been added to the kernel since the
104 .\"O program queried for the symbol table size, memory will be corrupted.
105 .I table
106 ÍѤ˳ÎÊݤ·¤¿¥Ð¥Ã¥Õ¥¡¤ÎÂ礭¤µ¤òÅÁ¤¨¤ëÊýË¡¤¬¤Ê¤¤¡£
107 ¥×¥í¥°¥é¥à¤¬¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤ÎÂ礭¤µ¤òÌ䤤¹ç¤ï¤»¤¿¸å¤Ë¡¢¥«¡¼¥Í¥ë¤Ë
108 ¥·¥ó¥Ü¥ë¤¬Äɲ䵤ì¤ë¤È¡¢¥á¥â¥ê¤ÎÆâÍƤ¬Ç˲õ¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤ë¡£
109 .PP
110 .\"O The length of exported symbol names is limited to 59 characters.
111 ¸ø³«¤µ¤ì¤ë¥·¥ó¥Ü¥ë̾¤ÎŤµ¤¬ 59 Ê¸»ú¤ËÀ©¸Â¤µ¤ì¤Æ¤¤¤ë¡£
112 .PP
113 .\"O Because of these limitations, this system call is deprecated in
114 .\"O favor of
115 .\"O .BR query_module (2)
116 .\"O (which is itself nowadays deprecated
117 .\"O in favor of other interfaces described on its manual page).
118 ¤³¤ì¤é¤ÎÀ©¸Â¤¬¤¢¤ë¤Î¤Ç¡¢¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È¤¦¤è¤ê¤Ï
119 .BR query_module (2)
120 ¤ò»È¤¦¤Î¤¬Ë¾¤Þ¤·¤¤
121 (¸½ºß¤Ç¤Ï
122 .BR query_module (2)
123 ¼«¿È¤â¤½¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¤è¤¦¤Ë
124 ¾¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»È¤¦¤Î¤¬Ë¾¤Þ¤·¤¤¤È¤µ¤ì¤Æ¤¤¤ë)¡£
125 .\"O .SH "SEE ALSO"
126 .SH ´ØÏ¢¹àÌÜ
127 .BR create_module (2),
128 .BR delete_module (2),
129 .BR init_module (2),
130 .BR query_module (2)