问题:编写最简单的内核模块,编译内核模块时报错
#include
#include
static int hello_init(void)
{
printk("hello,world\n");
return 0;
}
static void hello_exit(void)
{
printk("Good-bye, kernel!\n”);
}
module_init(hello_init);
module_exit(hello_exit);
gcc -c -o hello.o hello.c -Wall通过,
但是,insmod hello.o时,报如标题错误
d.x 于 2013-03-29 22:33:16发表:
哦,原来如次
棒球小宝 于 2013-03-28 13:22:52发表:
dingdingdingding
呼呼哈嘿 于 2013-03-25 11:37:06发表:
已解决。
由于我的疏忽,编译内核模块的内核版本与运行内核模块的版本不一致,所以出错。。
tworkprod 于 2013-03-23 08:47:10发表:
帮顶