LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Regarding dependent kernel modules (https://www.linuxquestions.org/questions/linux-kernel-70/regarding-dependent-kernel-modules-731730/)

dinkyverma279 06-09-2009 02:56 PM

Regarding dependent kernel modules
 
HI,

I have two kernel modules in old linux kernel version 2.6.10. I have to port these .ko modules to kernel version 2.6.27. I have ported it successfully. Since my one of kernel module is using the API of the another kernel modules. I have exported the API made using the EXPORT_SYMBOL and also made that methods extern in header files. I have included that header files in my 2nd modules.

So when I am compiling the first module, it is compiling successully and when i am compiling the 2nd module which is using the API of the first module. It is giving the following errors:

WARNING: "Register_Driver" [/usr/src/linux/drivers/usb/my/device/src/b.ko] undefined!
WARNING: "A_Free" [/usr/src/linux/drivers/usb/my/device/src/b.ko] undefined!

So first i load the module 1 using insmod, it is loaded successfully, But when i try to load another module using the insmod, I am getting the following error:

insmod: error inserting 'b.ko' : -1 unknown symbol in module

and when i saw through dmesg, I am getting following information:

b: no symbol version for Register_Driver
b: unknown symbol Register_Driver
b: no symbol version for A_Free
b: unknown symbol version for A_Free


Can somebody tell the work around for this? Why these warnings coming even?

regards,
dinky

Mara 06-10-2009 03:12 PM

Do the functions (?) come from the first module? Or maybe they are taken from a different place?

dinkyverma279 06-10-2009 03:59 PM

Hi Mara,

Thanks for reply. Yes These functions are from first module. So can you please tell why this is happening?

regards,
dinky


All times are GMT -5. The time now is 07:08 AM.