lkml.org 
[lkml]   [2006]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: searching exported symbols from modules
Date
On Friday 21 April 2006 00:33, Keith Owens wrote:
> "Antti Halonen" (on Wed, 19 Apr 2006 16:08:37 +0300) wrote:
> >Hi Dick,
> >
> >Thanks for your response.
> >
> >> `insmod` (or modprobe) does all this automatically. Anything that's
> >> 'extern' will get resolved. You don't do anything special. You can
> >> also use `depmod` to verify that you won't have any problems loading.
> >> `man depmod`.
> >
> >Yes, I know insmod and herein the problem lies. I have a module where
> >I want to use functions provided by another module, _if_ it is present,
> >otherwise use modules internal functions.
>
> symbol_get() and symbol_put(). See include/linux/module.h. If
> symbol_get() returns NULL then the symbol does not exist.

The trick with symbol_get is that it is marked as EXPORT_SYMBOL_GPL, so only
GPL modules can use it. Not that that is a bad thing though. :)

If you want all of these nice kernel features, GPL your module!

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

\
 
 \ /
  Last update: 2006-04-21 16:05    [W:0.249 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site