Do you know the bug of EXPORT_SYMBOL()
ishubist at gmail.com
Fri Jul 24 13:41:09 EDT 2015
This is the place where modprobe comes into play .If you have dependent
module the on your module then it is recommended to use modprobe .
After compiling your module run :
1. depmod -a
2. modprobe mod1
3. modprobe mod2
And as far as i know CONFIG_MODVERSION is basically for the module
signature according to which you can't directly insert a .ko file compiled
in another system.
On 24 July 2015 at 11:19, Navy <navych at 126.com> wrote:
> To my understanding, EXPORT_SYMBOL() is used to export a symbol in
> kernel/modules. The the address of the all sysbols is in /proc/kallsyms.
> Only symbols exported by EXPORT_SYMBOL() is listed its CRC information
> in Module.symvers. So I think the CRC is the key to export a symbol.
> I do an experiment:
> | |---mod1.c
> | |---Makefile
> mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL()
> and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and
> compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is
> complained. mod2.ko CAN'T BE INSMOD.
> I solve this problem by the method in Documentation/kbuild/modules.txt and
> heard this is a bug from kernel 2.6.
> Why this bug is not be fixed?
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies