]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/get_kernel_syms.2
user_namespaces.7: Minor wording fix to recently added text
[thirdparty/man-pages.git] / man2 / get_kernel_syms.2
index 19725f262430ae42bfdf0b3018b60baad49338c4..27661f0beed3ee7bf9ca9532dd75e21f417027cb 100644 (file)
@@ -1,35 +1,43 @@
 .\" Copyright (C) 1996 Free Software Foundation, Inc.
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
 .\" This file is distributed according to the GNU General Public License.
-.\" See the file COPYING in the top level source directory for details.
+.\" %%%LICENSE_END
 .\"
 .\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
 .\" reformatting and rewordings by mtk
 .\"
-.TH GET_KERNEL_SYMS 2 2006-02-09 "Linux" "Linux Programmer's Manual"
+.TH GET_KERNEL_SYMS 2 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 get_kernel_syms \- retrieve exported kernel and module symbols
 .SH SYNOPSIS
 .nf
 .B #include <linux/module.h>
-.sp
+.PP
 .BI "int get_kernel_syms(struct kernel_sym *" table );
 .fi
+.PP
+.IR Note :
+No declaration of this system call is provided in glibc headers; see NOTES.
 .SH DESCRIPTION
+.BR Note :
+This system call is present only in kernels before Linux 2.6.
+.PP
 If
 .I table
 is NULL,
 .BR get_kernel_syms ()
 returns the number of symbols available for query.
-Otherwise it fills in a table of structures:
+Otherwise, it fills in a table of structures:
 .PP
-.RS
-.nf
+.in +4n
+.EX
 struct kernel_sym {
     unsigned long value;
     char          name[60];
 };
-.fi
-.RE
+.EE
+.in
 .PP
 The symbols are interspersed with magic symbols of the form
 .BI # module-name
@@ -40,7 +48,7 @@ which the module is loaded.
 The symbols exported from each module follow their magic module tag
 and the modules are returned in the reverse of the
 order in which they were loaded.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On success, returns the number of symbols copied to
 .IR table .
 On error, \-1 is returned and
@@ -53,12 +61,20 @@ There is only one possible error return:
 .BR get_kernel_syms ()
 is not supported in this version of the kernel.
 .SH VERSIONS
-This system call is only present on Linux up until kernel 2.4;
+This system call is present on Linux only up until kernel 2.4;
 it was removed in Linux 2.6.
-.\" Removed in Linux-2.5.48
-.SH "CONFORMING TO"
+.\" Removed in Linux 2.5.48
+.SH CONFORMING TO
 .BR get_kernel_syms ()
-is Linux specific.
+is Linux-specific.
+.SH NOTES
+This obsolete system call is not supported by glibc.
+No declaration is provided in glibc headers, but, through a quirk of history,
+glibc versions before 2.23 did export an ABI for this system call.
+Therefore, in order to employ this system call,
+it was sufficient to manually declare the interface in your code;
+alternatively, you could invoke the system call using
+.BR syscall (2).
 .SH BUGS
 There is no way to indicate the size of the buffer allocated for
 .IR table .
@@ -72,7 +88,7 @@ favor of
 .BR query_module (2)
 (which is itself nowadays deprecated
 in favor of other interfaces described on its manual page).
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR create_module (2),
 .BR delete_module (2),
 .BR init_module (2),