lkml.org 
[lkml]   [2000]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Calling module symbols from inside the kernel !
forop066@zaz.com.br wrote:
>
> Is it possible to access symbols exported by modules from inside the kernel ?
>
> I put a funtion call inside the kernel code but this funtion must be implemented in a module. I tried export as a module symbol but when i tried to recompile the kernel.. :-(
>
> Warning: implicit declaration of my_funtion
> .
> .
> .
> Error: Undefined reference to my_funtion.
>
> How can i fix this mistake!????
>
> Thanks in advance,
> Cris Amon.

You will need to use a function pointer hook that the module fills in
when it is loaded. For an example look at devpts_upcall_new and
devpts_upcall_kill in fs/devpts/inode.c. The hooks are resident in the
kernel and are exported so the module can see them. The caller then
needs to check if the hook is null and optionally request the module be
loaded.

--

Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.035 / U:9.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site