1GET_KERNEL_SYMS(2)         Linux Programmer's Manual        GET_KERNEL_SYMS(2)
2
3
4

NAME

6       get_kernel_syms - retrieve exported kernel and module symbols
7

SYNOPSIS

9       #include <linux/module.h>
10
11       int get_kernel_syms(struct kernel_sym *table);
12

DESCRIPTION

14       Note: This system call is present only in kernels before Linux 2.6.
15
16       If  table  is  NULL,  get_kernel_syms()  returns  the number of symbols
17       available for query.  Otherwise it fills in a table of structures:
18
19           struct kernel_sym {
20               unsigned long value;
21               char          name[60];
22           };
23
24       The symbols are interspersed with magic symbols of  the  form  #module-
25       name with the kernel having an empty name.  The value associated with a
26       symbol of this form is the address at which the module is loaded.
27
28       The symbols exported from each module follow their magic module tag and
29       the modules are returned in the reverse of the order in which they were
30       loaded.
31

RETURN VALUE

33       On success, returns the number of symbols copied to table.   On  error,
34       -1 is returned and errno is set appropriately.
35

ERRORS

37       There is only one possible error return:
38
39       ENOSYS get_kernel_syms()  is  not supported in this version of the ker‐
40              nel.
41

VERSIONS

43       This system call is present on Linux only up until kernel 2.4;  it  was
44       removed in Linux 2.6.
45

CONFORMING TO

47       get_kernel_syms() is Linux-specific.
48

BUGS

50       There is no way to indicate the size of the buffer allocated for table.
51       If symbols have been added to the kernel since the program queried  for
52       the symbol table size, memory will be corrupted.
53
54       The length of exported symbol names is limited to 59 characters.
55
56       Because  of  these limitations, this system call is deprecated in favor
57       of query_module(2) (which is itself nowadays  deprecated  in  favor  of
58       other interfaces described on its manual page).
59

SEE ALSO

61       create_module(2), delete_module(2), init_module(2), query_module(2)
62

COLOPHON

64       This  page  is  part of release 3.53 of the Linux man-pages project.  A
65       description of the project, and information about reporting  bugs,  can
66       be found at http://www.kernel.org/doc/man-pages/.
67
68
69
70Linux                             2012-10-18                GET_KERNEL_SYMS(2)
Impressum