.\" Copyright (C) 1996 Free Software Foundation, Inc. .\" This file is distributed accroding to the GNU General Public License. .\" See the file COPYING in the top level source directory for details. .\" $Id: get_kernel_syms.2,v 1.1.1.1 1998/01/06 20:51:07 ewt Exp $ .\" .TH GET_KERNEL_SYMS 2 "26 Dec 1996" Linux "Linux Module Support" .SH NAME get_kernel_syms \- retrieve exported kernel and module symbols .SH SYNOPSIS .nf .B #include .sp .BI "int get_kernel_syms(struct kernel_sym *" table ); .fi .SH DESCRIPTION If \fItable\fP is \fBNULL\fP, \fBget_kernel_syms\fP returns the number of symbols available for query. Otherwise it fills in a table of structures: .PP .RS .nf struct kernel_sym { unsigned long value; char name[60]; }; .fi .RE .PP The symbols are interspersed with magic symbols of the form .BI # module-name with the kernel having an empty name. The value associated with a symbol of this form is the address at which the module is loaded. .PP The symbols exported from each module follow their magic module tag and the modules are returned in the reverse order they were loaded. .SH "RETURN VALUE" Returns the number of symbols returned. There is no possible error return. .SH "SEE ALSO" .BR create_module "(2), " init_module "(2), " delete_module "(2), " .BR query_module "(2)." .SH BUGS There is no way to indicate the size of the buffer allocated for \fItable\fP. If symbols have been added to the kernel since the program queried for the symbol table size, memory will be corrupted. .PP The length of exported symbol names is limited to 59. .PP Because of these limitations, this system call is depreciated in favor of \fBquery_module\fP.