Re: accessing kernel symbol information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks to everyone who has replied to this mail.

On 6/15/06, Gaurav Dhiman <gauravd.chd@xxxxxxxxx> wrote:
Hi Jinesh,

I think, kernel only keep accounting of module exported symbols and
not all the symbols (functions and varialbes) of kernel. Moreover the

kernel should maintain its own symbol information. otherwise how can a
module be linked to it upon loading.

virtual addresss for these symbols can only be determined at build
time, so kenel can not keep track of it. But yes, I think insmod while

i believe here we are not dealing with virtual addresses at all since
kernel uses only physical ones. also, since linking of modules takes
place only at load time, those offset addresses will also be properly
translated to kernel physical memory.

loading the kernel module gets the exported symbol infomation for
already loaded modules by  query_module() system call, which further
uses the qm_symbol() kernel function.

The exported symbol information is stroed in each kernel module
structure as follows:

module->syms->name
modue->syms->value

where module is the pointer to structure of 'struct module' type

Gaurav


in a  previous mail Prateek had mentioned about the kallsyms proc
functionality. i'm also going through the kernel/kallsyms.c. if
possible someone help me finding the proper logic to read through the
kernel symbol table. i'm a bit lazy in going through code written by
others

jinesh.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux