Re: Compile warning when using exported symbols located in other loadable module

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

 



Martin Jambor wrote:

It seems you don't have the function prototype in any header file
included in that source file.

Actually I do have a prototype in a shared header file. If I don't include the prototype (the declaration) I get the following warning

make -C /lib/modules/2.6.10-1.770_FC3/build M=/home/tony/learnexport/user modules
make[1]: Entering directory `/lib/modules/2.6.10-1.770_FC3/build'
CC [M] /home/tony/learnexport/user/user.o
/home/tony/learnexport/user/user.c: In function `user_init':
/home/tony/learnexport/user/user.c:11: warning: implicit declaration of function `some_exported_symbol'
LD [M] /home/tony/learnexport/user/usesexport.o
Building modules, stage 2.
MODPOST
*** Warning: "some_exported_symbol" [/home/tony/learnexport/user/usesexport.ko] undefined!
CC /home/tony/learnexport/user/usesexport.mod.o
LD [M] /home/tony/learnexport/user/usesexport.ko
make[1]: Leaving directory `/lib/modules/2.6.10-1.770_FC3/build'


in addition to the original warning I am trying to resolve. I believe the warning I'm trying to resolve is basically what would normally be a linker error as it cannot find the definition of the function. In my case the code resides in another module. The mainline kernel tree must have a way to handle this as I don't get these types of warnings when compiling the standard kernel modules.

Thanks,
-Tony

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux