tech-kern archive

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

modload under netbsd-5 appears not to export symbols from loaded modules for use by subsequent modules



        Hello.  I'm working on bringing  some modules forward from NetBSD-3 to
NetBSD-5.  I've got all compiled and ready to test.  But, I have a problem.
I have two modules are loaded in order and where the second module uses
functions from the first.  These are the old zaptel modules from the
zaptel-netbsd package.  When I load the ztdummy module,  which uses functions
from the zaptel module, I get the following output:

#/etc/rc.d/lkm3 start

mod_zaptel.o: Module loaded as ID 0
mod_ztdummy.o: /usr/pkg/lkm/mod_ztdummy.o: In function `ztdummy_timer':
/usr/pkgsrc/comms/zaptel-netbsd/work/zaptel-netbsd-20050404/ztdummy/ztdummy.c:75:
 undefined reference to `zt_receive'
/usr/pkgsrc/comms/zaptel-netbsd/work/zaptel-netbsd-20050404/ztdummy/ztdummy.c:76:
 undefined reference to `zt_transmit'
/usr/pkg/lkm/mod_ztdummy.o: In function `cleanup_module':
/usr/pkgsrc/comms/zaptel-netbsd/work/zaptel-netbsd-20050404/ztdummy/ztdummy.c:152:
 undefined reference to `zt_unregister'
/usr/pkg/lkm/mod_ztdummy.o: In function `ztdummy_initialize':
/usr/pkgsrc/comms/zaptel-netbsd/work/zaptel-netbsd-20050404/ztdummy/ztdummy.c:101:
 undefined reference to `zt_register'
modload: can't prelink `/usr/pkg/lkm/mod_ztdummy.o' creating 
`/usr/pkg/lkm/mod_ztdummy'

        Is there a reason why the linker can't see the symbols from the first
module when loading the second module?  Is it easily worked around?
-thanks
-Brian


Home | Main Index | Thread Index | Old Index