Re: sys_open undefined! when i try to load module

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

 



Hi Gourav..

/sbin/ksyms tells you which symbols are exported in running kernel.

i don't find in my FC5...rather i can find /proc/kallsyms....
i do man /proc/kallsyms and got this line:
/proc/kallsyms (since Linux 2.5.71) :  This holds the kernel exported symbol definitions used by the modules(X)  tools  to  dynamically  link  and bind loadable modules.  In Linux 2.5.47 and earlier, a similar file with slightly different syntax was named ksyms.

and i did
[suman@ajit /]$ cat /proc/kallsyms | grep "sys_open"
c0152074 T do_sys_open
c015211e T sys_openat
c0152139 T sys_open
[suman@ajit /]$  

Which says that sys_open is exported. Correct...or could you please tell me what is this output?

And one more , if i look at source code i could find these line which says that sys_open has been exported by EXPORT_SYMBOL_GPL(sys_open).
http://lxr.linux.no/source/fs/open.c#L933
look at line 962.
I know symbol which is exported by EXPORT_SYMBOL_GPL() is availavle to only  module which is declared as a  MODULE_LICENSE("GPL")....
So in source code , if it is exported and if i can see through /proc/kallsyms then why i can't access this symbol? More ever i am literally confused .
Can anybody please explain me :

1. What is System. map file?
2. What is /proc/kallsyms entry? what's the use of this entry?
3. How can i know all exported sysmbol in kernel and which i can use?

by default in standard kernel, no system call functions are exported,

is it? then how can  you  write your device driver without using any system call?
Do you mean that if i want to write my driver , i have to compile my kernel?


Sorry for the too much question . I am learning kernel programming....Might be i am making wrong question. Please correct me ......

if you want to use them, you need to export them explicitly in kernel
code and recompile and boot you m/c with that newly recomplied kernel
image.

Gaurav



[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