Problem with module spanning from multiple files
Philipp Ittershagen
p.ittershagen at googlemail.com
Wed Jul 18 04:14:44 EDT 2012
Hi aleksey,
On Wed, Jul 18, 2012 at 9:34 AM, aleksey <lexa at cfotr.com> wrote:
> test.c:
> #include <linux/kernel.h>
> #include <linux/module.h>
>
> int my_module_init(void)
> {
> pr_emerg("Hello, world - this is the kernel speaking\n" ) ;
> return 0;
> }
>
> MODULE_DESCRIPTION("test driver" ) ;
> MODULE_LICENSE("GPL v2" ) ;
> MODULE_VERSION("0.1" ) ;
>
> module_init(my_module_init) ;
> module_exit(my_module_exit) ;
this should not compile. How does the compiler know the symbol "my_module_exit"?
Greetings,
Philipp
More information about the Kernelnewbies
mailing list