|
发表于 2004-8-17 10:00:39
|
显示全部楼层
[quote:19fa3467f6="panzhenjie"][quote:19fa3467f6="mozilla"]gcc -c test.c -D__KERNEL__ -include /usr/src/linux/include/linux/modversions.h -I/usr/src/linux/include[/quote]
我在自己的机器上用了
[root@localhost code]# gcc -c hello.c -D__KERNEL__ -include /usr/src/linux-2.4.20-8/include/linux/modversions.h -I/usr/src/linux-2.4.20-8/include
[root@localhost code]# insmod hello.o
Warning: loading hello.o will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module hello loaded, with warnings
终于能加载这个模块了,当然rmmod hello也是成功的,然而却没有预料中hello , world的输出,这是怎么回事阿?[/quote]
在终端下看不到,在控制台下就能看到了. |
|