OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / modutils / original / 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 .TH GET_KERNEL_SYMS 2 "26 Dec 1996" Linux "Linux Module Support"
6 .SH NAME
7 get_kernel_syms \- retrieve exported kernel and module symbols
8 .SH SYNOPSIS
9 .nf
10 .B #include <linux/module.h>
11 .sp
12 .BI "int get_kernel_syms(struct kernel_sym *" table );
13 .fi
14 .SH DESCRIPTION
15 If \fItable\fP is \fBNULL\fP, \fBget_kernel_syms\fP returns the
16 number of symbols available for query.  Otherwise it fills in a
17 table of structures:
18 .PP
19 .RS
20 .nf
21 struct kernel_sym
22 {
23   unsigned long value;
24   char name[60];
25 };
26 .fi
27 .RE
28 .PP
29 The symbols are interspersed with magic symbols of the form
30 .BI # module-name
31 with the kernel having an empty name.
32 The value associated with a symbol of this form is the address at
33 which the module is loaded.
34 .PP
35 The symbols exported from each module follow their magic module tag
36 and the modules are returned in the reverse order they were loaded.
37 .SH "RETURN VALUE"
38 Returns the number of symbols returned.  There is no possible error return.
39 .SH "SEE ALSO"
40 .BR create_module "(2), " init_module "(2), " delete_module "(2), "
41 .BR query_module "(2)."
42 .SH BUGS
43 There is no way to indicate the size of the buffer allocated for
44 \fItable\fP.  If symbols have been added to the kernel since the
45 program queried for the symbol table size, memory will be corrupted.
46 .PP
47 The length of exported symbol names is limited to 59.
48 .PP
49 Because of these limitations, this system call is deprecated in
50 favor of \fBquery_module\fP.