Hi All,
I was working with the example from http://ldn.linuxfoundation.org/article/kernel-symbols-whats-available-your-module-what-isnt I am getting the error unresolved symbol rday_3, ARCH=arm omap kernel=2.3.32.9 insmod m2.ko then insmod m3.ko unresolved symbol rday_3
then i did cat /proc/kallsyms | grep rday_3 i can see the rday_3 in that file,But still I am unable to insmod the m3.ko Can anybody please share some idea on this,Is anything there that's need to be enabled in config file in kernel,Below is the code
file m2.c
#include <linux/module.h> #include <linux/init.h> #include <linux/kernel.h>
static int rday_1 = 1; int rday_2 = 2; int rday_3 = 3;
EXPORT_SYMBOL(rday_3);
static int __init hi(void) { printk(KERN_INFO "module m2 being loaded.\n"); return 0; }
static void __exit bye(void) { printk(KERN_INFO "module m2 being unloaded.\n"); }
module_init(hi); module_exit(bye);
MODULE_AUTHOR("Robert P. J. Day"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Let's try some exporting.");
file m3.c
#include <linux/module.h> #include <linux/init.h> #include <linux/kernel.h>
extern int rday_3;
static int __init m3hi(void) { printk(KERN_INFO "module m2 being loaded = %d\n",rday_3); return 0; }
static void __exit m3bye(void) {
printk(KERN_INFO "module m2 being unloaded.\n"); }
module_init(m3hi); module_exit(m3bye);
MODULE_AUTHOR("Robert P. J. Day"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Let's try some exporting.");
Best regards,
|