Thanks for the quick reply.
I have kernel modules for USB Host, device and OTG. These platform drivers ( usb bus driver (h/w drivers)).
As of now I am using EXPORT_SYMBOL to export a variable flag for doing Inter-Module-communication. Problem: other modules which are using this variable fail while doing insmod if original module exporting this variable is Not loaded.
So I am looking a way in which I don’t have to worry if my original module is loaded or not.
For this I need to check for the export symbol via c code (module code, or ko file code).
Again I can check in System.map but I am on embedded board, so I don’t have System.map on my up and running linux image.
I hope things are clear now.
I will check kallsyms now.
Regards Vivek -----Original Message-----
Hi Vivek,
What you are trying to do is very unclear.
> 1. Is there a way of exporting symbol kernel?
Ofcourse, EXPORT_SYMBOL(). Wait, did I understand your question correctly?
> 2. Or is there any way which I can check if symbol is present in the kernel in c code?
Check it in kallsyms
> 3. Or Can I load the Module A from Module B [in c code] (without using modprobe).
Huh? Are you trying to load a module from C code in kernel space? N-O-!. Yes, a C code in application space can load modules.
Thanks,
Rajat |