From <linux/module.h> :
#ifdef MODULE #define MODULE_GENERIC_TABLE(gtype,name) \ extern const struct gtype##_id __mod_##gtype##_table \ __attribute__ ((unused, alias(__stringify(name)))) extern struct module __this_module; #define THIS_MODULE (&__this_module) #else #define MODULE_GENERIC_TABLE(gtype,name) #define THIS_MODULE ((struct module *)0) #endif
I see that " extern struct module __this_module; " is just a declaration of __this_module , but not a definition of __this_module . So where is the __this_module memory __this_module ? I can not find it in kernel code.
source share