int init_module(void)
{
pintk("<1>hello world\n");
return 0;
}
void cleanup_module(void)
{
printk("<1>goodbye\n");
}
接着
#gcc -c hello.c
#insmod hello.o
然后就出现警告:
hello.o: kernel-module version mismatch
hello.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8.