lkml.org 
[lkml]   [2006]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: searching exported symbols from modules
From
Date
On Wed, 2006-04-19 at 18:34 +0300, Antti Halonen wrote:
> Thanks for your persistence!
>
> > but to what purpose?
> > what on earth do you need this for?
> > Again you talk about solutions not about the problem you're trying to
> > solve.
>
> I have module which has set of algorithms. When I load my module, I will
> initialize my function pointer interface to point to these algorithms.
> And then go ahead and use my pointers trough the application...
>
> This way I can easily add new algorithm implementations into my product
> and decide on the fly which ones to initialize into use.
>
> Now. It happens that I have another module which offers algorithms I
> want to be able to use. So when I shoot up my module it should be able
> to initialize
> either the ones the external module offers or use the internal
> algorithms. In order to do this, I need to figure out on the fly if the
> other module is present, where it is, where I can find the function
> addresses...

a better way would be then to have a "core" module which is basically
collecting these algorithms, and then have the algorithm modules, when
they are loaded, register themselves with this core module. (and
unregister at unload). It's sort of inside-out with they way you're
trying to do it, but it'll work out a lot nicer. Obviously the user of
the algorithms can be another module in addition to this core module.
(and even register algorithms itself)
There's many examples in the kernel that work similar to this, for
example the crypto framework.


-
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-19 17:45    [W:0.035 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site