LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Can someone give me the definition of "Kernel Symbol" and "EXPORT_SYMBOL" ?? (http://www.linuxquestions.org/questions/programming-9/can-someone-give-me-the-definition-of-kernel-symbol-and-export_symbol-666456/)

Raynus 08-30-2008 08:53 AM

Can someone give me the definition of "Kernel Symbol" and "EXPORT_SYMBOL" ??
 
After searching google & readng O'Reiley Linux Device Driver

i still don't get the point.

Can someone give me the definition of "Kernel Symbol" and "EXPORT_SYMBOL" ??

Thanksyou in advance

cheers

pinniped 08-30-2008 09:04 AM

A kernel symbol can mean any symbol (variable, routine, etc) in the kernel, but is probably understood to be all the routines available to the user (cat /proc/kallsyms). Exported symbols are symbols which each device driver (or other kernel routine) makes available to the rest of the kernel. This is necessary because some drivers need to share information between them, but generally all symbols in a module are hidden from the rest of the kernel (to avoid the 'namespace pollution' problem). So, for example, any routines and variables in a device driver which need to be accessible to another device driver will have the EXPORT_SYMBOL macro to export it (or EXPORT_GPL_SYMBOL if the author only wants that information to be available to GPL drivers and not non-free drivers).

Raynus 08-30-2008 08:19 PM

Thats clear

thanks pinniped


All times are GMT -5. The time now is 11:43 AM.