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

RETURN VALUE

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

ERRORS

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

VERSIONS

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

CONFORMING TO

45       get_kernel_syms() is Linux-specific.
46

BUGS

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

SEE ALSO

59       create_module(2), delete_module(2), init_module(2), query_module(2)
60

COLOPHON

62       This  page  is  part of release 3.25 of the Linux man-pages project.  A
63       description of the project, and information about reporting  bugs,  can
64       be found at http://www.kernel.org/doc/man-pages/.
65
66
67
68Linux                             2007-06-03                GET_KERNEL_SYMS(2)
Impressum