1get_kernel_syms(2) System Calls Manual get_kernel_syms(2)
2
3
4
6 get_kernel_syms - retrieve exported kernel and module symbols
7
9 #include <linux/module.h>
10
11 [[deprecated]] int get_kernel_syms(struct kernel_sym *table);
12
14 Note: This system call is present only 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
33 On success, returns the number of symbols copied to table. On error,
34 -1 is returned and errno is set to indicate the error.
35
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
43 Linux.
44
46 Removed in Linux 2.6.
47
48 This obsolete system call is not supported by glibc. No declaration is
49 provided in glibc headers, but, through a quirk of history, glibc ver‐
50 sions before glibc 2.23 did export an ABI for this system call. There‐
51 fore, in order to employ this system call, it was sufficient to manu‐
52 ally declare the interface in your code; alternatively, you could in‐
53 voke the system call using syscall(2).
54
56 There is no way to indicate the size of the buffer allocated for table.
57 If symbols have been added to the kernel since the program queried for
58 the symbol table size, memory will be corrupted.
59
60 The length of exported symbol names is limited to 59 characters.
61
62 Because of these limitations, this system call is deprecated in favor
63 of query_module(2) (which is itself nowadays deprecated in favor of
64 other interfaces described on its manual page).
65
67 create_module(2), delete_module(2), init_module(2), query_module(2)
68
69
70
71Linux man-pages 6.05 2023-03-30 get_kernel_syms(2)