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.
5 .\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
6 .\" reformatting and rewordings by mtk
8 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
9 .\" Translated 2006-07-29, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
11 .TH INIT_MODULE 2 2006-02-09 "Linux" "Linux Programmer's Manual"
14 .\"O init_module \- initialize a loadable module entry
15 init_module \- ローダブルモジュールのエントリを初期化する
19 .B #include <linux/module.h>
21 .BI "int init_module(const char *" name ", struct module *" image );
25 .\"O .BR init_module ()
26 .\"O loads the relocated module image into kernel space and runs the
31 は再配置されたモジュールイメージをカーネル空間にロードし、
36 .\"O The module image begins with a module structure and is followed by
37 .\"O code and data as appropriate.
38 .\"O The module structure is defined as follows:
39 モジュールイメージは先頭部分に module 構造体があり、その後ろに
41 この module 構造体は以下のように定義されている:
46 unsigned long size_of_struct;
54 struct module_symbol *syms;
55 struct module_ref *deps;
56 struct module_ref *refs;
58 void (*cleanup)(void);
59 const struct exception_table_entry *ex_table_start;
60 const struct exception_table_entry *ex_table_end;
68 .\"O All of the pointer fields, with the exception of
72 .\"O are expected to point within the module body and be
73 .\"O initialized as appropriate for kernel space, that is, relocated with
74 .\"O the rest of the module.
78 以外の全てのポインタ要素はモジュール本体内部を指し、
79 カーネル空間での適切な値で初期化される (つまり、モジュールの残りの
82 .\"O This system call requires privilege.
83 このシステムコールを使うには特権が必要である。
84 .\"O .SH "RETURN VALUE"
86 .\"O On success, zero is returned.
87 .\"O On error, \-1 is returned and
89 .\"O is set appropriately.
90 成功すると 0 を返す。エラーの場合 \-1 を返し、
97 .\"O The module's initialization routine failed.
104 .\"O is outside the program's accessible address space.
108 がプログラムがアクセスできるアドレス空間の外部にある。
113 .\"O slot is filled in incorrectly,
115 .\"O does not correspond to the original module name, some
117 .\"O entry does not correspond to a loaded module,
118 .\"O or some other similar inconsistency.
123 が元のモジュール名と一致していない。または、一部の
125 エントリがロードされたモジュールに対応していない。
129 .\"O No module by that name exists.
133 .\"O The caller was not privileged
134 .\"O (did not have the
135 .\"O .B CAP_SYS_MODULE
140 .\"O .SH "CONFORMING TO"
142 .\"O .BR init_module ()
143 .\"O is Linux-specific.
148 .BR create_module (2),
149 .BR delete_module (2),