OSDN Git Service

40457849dfe7b0f186200fabf60559f06cabdaaf
[linuxjm/LDP_man-pages.git] / 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)