My test case is to  sure that if cross references is viable.
The modules are ModuleA and ModuleB.In ModuleA ,it references ModuleB's 
function funBaseModuleB().In the same way ,ModuleB references ModuleA's 
function funBaseModuleA().

my linking params:
for ModuleA:
ld -dy -r -N"ModuleB" -o ModuleA ModuleA.o

for ModuleB:
ld -dy -r -N"ModuleA" -o ModuleB ModuleB.o

when using "[b]modload ModuleA[/b]"  ,I can see the following message:

Jul 20 10:34:26 unix001 krtld: [ID 472681 kern.notice] WARNING: mod_load: 
cannot load module 'moduleA'
Jul 20 10:34:26 unix001 krtld: [ID 749970 kern.notice] WARNING: moduleA: 
Jul 20 10:34:26 unix001 krtld: [ID 225575 kern.notice] unable to resolve 
dependency, module 'moduleB' not found

The above messeage  gives our tips: kobj_load_module()  failed


Is there some other method to cross references  between two modules?

Though the cross references is bad a design,some migrations which from Linux to 
Solaris will face that problem. For Linux ,the 
EXPORT_SYMBOL/symbol_get/symbol_put APIs can achieve the references .

I hope for your help. 
Thanks!!!
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to