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

Re: Re: Kernel Module Programming: Calling/exporting Functions



On Tue, 1 Mar 2005 11:29:07 -0800, Sanjay <hegdesan@xxxxxxxxxxxxxx> wrote:
> Hi,
> 
> When I try to add the function in dev.c and compile, I get the message
> saying  undefined reference to `driver_control'. Am I missing something
> here?. Looks like liking is not happening properly. Should I add any header
> files in dev.c?
> 
> Thanks/Sanjay
> 

Make sure that the driver_control symbol has been exported.

cat /proc/ksyms | grep driver_control

Also add 'extern driver_control' in your code. This tells the comiler
that this symbol is defined elsewhere and thus should be resolved when
loading the module.

Hope this helps :)
-Shri

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