On Wed, Jan 29, 2003 at 11:13:16AM -0000, nitin kumbhar wrote: > On Wed, 29 Jan 2003 Seth Arnold wrote : > >On Tue, Jan 28, 2003 at 05:24:24PM -0500, John F Davis wrote: > >> I was under the impression that all routines (ie. functions) > >were shown > in > >> /proc/ksyms. However, I have a driver which is in the kernel > >but > >> none of its routines show up in /proc/ksyms. What is the > >deal? > > I think, the driver u r talking about is present in kernel image > (ie it is not a > module). if this is the case /proc/ksyms or "ksyms" command won't > show > the functions in driver. > if u want to list those functions then 1) u need to export > (EXPORT_SYMBOL) them. 2) make that driver as a module so that all > the One _OR_ the other, not both. All symbols from modules are exported by default, unless overriden (might be overriden by some magic macro in moudle.h). From kernel proper, symbols are exported using EXPORT_SYMBOL macro (it may only appear in file marked as exporting something in the Makefile, so a global ksyms.c and per-arch ksyms.c are used. > symbols from the driver will be visible. Here u have to make sure > that the > driver is not using the register_symtab() to register few or NO > symbols. > this is so bcoz register_symtab() overwrites exporting of all > symbols from > a module. > > > > >This is the difference between exported and non-exported > >symbols. > > > >EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL() are the macros you > are looking > >for. > > Is there any way to know non-exported symbols? > > Regards, > Nitin > > > > > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/