GET_KERNEL_SYMS(2) Linux Module Support GET_KERNEL_SYMS(2)NAME
get_kernel_syms - retrieve exported kernel and module symbols
SYNOPSIS
#include <linux/module.h>
int get_kernel_syms(struct kernel_sym *table);
DESCRIPTION
If table is NULL, get_kernel_syms returns the number of symbols available for query. Otherwise it fills in a table of structures:
struct kernel_sym
{
unsigned long value;
char name[60];
};
The symbols are interspersed with magic symbols of the form #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.
The symbols exported from each module follow their magic module tag and the modules are returned in the reverse order they were loaded.
RETURN VALUE
Returns the number of symbols returned. There is no possible error return.
SEE ALSO create_module(2), init_module(2), delete_module(2), query_module(2).
BUGS
There is no way to indicate the size of the buffer allocated for table. If symbols have been added to the kernel since the program queried
for the symbol table size, memory will be corrupted.
The length of exported symbol names is limited to 59.
Because of these limitations, this system call is deprecated in favor of query_module.
Linux 26 Dec 1996 GET_KERNEL_SYMS(2)
Check Out this Related Man Page
GET_KERNEL_SYMS(2) Linux Programmer's Manual GET_KERNEL_SYMS(2)NAME
get_kernel_syms - retrieve exported kernel and module symbols
SYNOPSIS
#include <linux/module.h>
int get_kernel_syms(struct kernel_sym *table);
DESCRIPTION
Note: This system call is present only in kernels before Linux 2.6.
If table is NULL, get_kernel_syms() returns the number of symbols available for query. Otherwise it fills in a table of structures:
struct kernel_sym {
unsigned long value;
char name[60];
};
The symbols are interspersed with magic symbols of the form #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.
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.
RETURN VALUE
On success, returns the number of symbols copied to table. On error, -1 is returned and errno is set appropriately.
ERRORS
There is only one possible error return:
ENOSYS get_kernel_syms() is not supported in this version of the kernel.
VERSIONS
This system call is only present on Linux up until kernel 2.4; it was removed in Linux 2.6.
CONFORMING TO
get_kernel_syms() is Linux-specific.
BUGS
There is no way to indicate the size of the buffer allocated for table. If symbols have been added to the kernel since the program queried
for the symbol table size, memory will be corrupted.
The length of exported symbol names is limited to 59 characters.
Because of these limitations, this system call is deprecated in favor of query_module(2) (which is itself nowadays deprecated in favor of
other interfaces described on its manual page).
SEE ALSO create_module(2), delete_module(2), init_module(2), query_module(2)COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-10-18 GET_KERNEL_SYMS(2)
Hi All,
I need some sort of library or module which read the db table at one go and keep in process memory.My problem is that I have a call processing module which handles the network call and goes for db lookup for subscriber profile in oracle db for every call.I am using Oracle Standard Edition... (0 Replies)
Hi,
I would like to know which works better in this scenario:
I have a file which contains about 300K to 400K records. This file will be loaded into an oracle table but will be filtered first. I have two ways of doing this.
1st, I filtered the original file and created a new file... (1 Reply)
Hi,
Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ?
The only thing I know is modinfo, that actually looks a the module .ko and gives a... (3 Replies)
Hi masters,
I am new to kernel programming and learning its trade. I am writing a module for lan bandwidth manager. I designed one module successfully for 2.4 kernel . But when I tried to upgrade it for 2.6 kernel I found that struct tq_struct is missing . Is there any suitable... (2 Replies)
Hi all...
the last two weeks have been very educational... I went through a bunch of websites about linux and its commands.. still not have mastered it nor its many operators ... and symbols. I wish I had more time to dig to the next and unix.com but I m on a deadline for this project.
I... (2 Replies)
I have TXT files to process but they contain the degree symbols in them due to which the processing program fails on these files. I want a unix command that will remove the degree symbols from these files.
I tried using the sed command: sed 's///g' filename but it did not work. This issue... (14 Replies)
I noticed that sometimes there is "~#" or "~$" in the terminal. What is that? I can't make any research in google because I don't know what are they called. I even tried reading pdf's or books but unfortunately, I wasn't lucky to find out. Maybe I was not persistent enough but I am really... (3 Replies)
I am aware of debugging linux applications using gdb and ddd.
Now I have written a simple kernel module having init_module, exit _module and some functions for tasklets and workqueues.
I want to debug these kernel modules like I used to debug applications setting breakpoints etc.
How can I debug... (1 Reply)
I came across a difference between Unix and Linux, when it comes to resolving the symbols from the libs.
consider the following code segments...
$ cat call1.c
#include <stdio.h>
int a1;
extern int a3;
void prnt_a3()
{
printf("\n%d\n",a3);
}
$ cat test.c
#include <stdio.h>... (12 Replies)
Hi I am trying to remove all the symbols in a file (testfile1) and using the below command to do that. Its not working for me. Can you help me on what is wrong with below script?
I want to retain only alphabets in a file and remove all the symbols like *:.+= etc
sed 's/^.//g' testfile1 > testfile2 (4 Replies)
I would like produce
blue, green, red, yellowfrom"blue:,*green:,*red:,*yellowI can remove the colon with
echo "blue:,*green:,*red:,*yellow" | sed 's/://g'which givesblue,*green,*red,*yellowbut when I try
echo "blue:,*green:,*red:,*yellow" | sed 's/://g'; 's/*//g'I get bash: s/*//g: No such... (9 Replies)
Hi, I need to look at a recent copy of /usr/include/errno.h from AIX 7.2 to check some symbols. In particular, I'm curious if it defines EOWNERDEAD and ENOTRECOVERABLE. Can someone who has access to 7.2 please check for me? Thanks! (1 Reply)