我的系统用的是redhat 9,
gcc -c hello.c
没有任何问题,但是下面却出现这样的问题,是怎么一会事呀,
[root@localhost /]# insmod ./hello.o
./hello.o: kernel-module version mismatch
./hello.o was compiled for kernel version 2.4.28
while this kernel is version 2.4.20-8.
[root@localhost /]# gcc -I/usr/src/linux-2.4/include -D __KERNEL__ -c modt.c
[root@localhost /]# insmod modt.o
Warning: loading modt.o will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted
modules
Module modt loaded, with warnings
[root@localhost /]# gcc -I/usr/src/linux-2.4/include -c modt.c
[root@localhost /]# insmod modt.o
insmod: a module named modt already exists
[root@localhost /]# rmmod modt.o
rmmod: module modt.o is not loaded