Subject: Re: one LKM using symbols from another - cluebat, please
To: Jeff Rizzo <riz@boogers.sf.ca.us>
From: None <cube@cubidou.net>
List: tech-kern
Date: 10/20/2004 00:10:05
On Tue, Oct 19, 2004 at 02:57:36PM -0700, Jeff Rizzo wrote:
> Jeff Rizzo wrote:
> 
> > I'm currently in the process of porting a set of drivers from FreeBSD 
> > 5.2.1 which are "modules" in the FreeBSD sense, and I've made them 
> > (well, the first two, so far) into LKMs on NetBSD.   One of the 
> > drivers requires access to functions in the other, but when I load the 
> > second module, I get 'undefined reference' errors for the functions in 
> > the first module it calls.
> >
> > Obviously, I'm forgetting to do something here.  I don't work with 
> > LKMs (or the kernel, for that matter) very much, so I'm feeling a bit 
> > clueless...  Also, if it matters, this is on NetBSD 2.0_RC4, the i386 
> > port.
> >
> > Thanks for any suggestions. +j
> >
> >
> >
> It has been suggested to me that I include some more specific 
> information, so here goes.  The errors I wrote of come when I modload 
> the LKM:
> 
> # modload mod_ztdummy.o

You do know that you have to do 'modload -s' for the one you need symbols
from?  Otherwise the symbol table is not loaded to the kernel.

And if you want to debug you should modload -s all modules anyway.

Quentin Garnier.