#define MODULE
#include <linux/module.h>
int init_module(void) { printk("<1>Hello, world\n"); return 0; }
void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }
編譯時出現:
[root@socdsp5 iknow]# gcc -c module-1.c
[root@socdsp5 iknow]# insmod ./module-1.o
./module-1.o: kernel-module version mismatch
./module-1.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8.
[root@socdsp5 iknow]#
請問下面訊息,該如何解決??
./module-1.o: kernel-module version mismatch
./module-1.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8.
我用的是redhat9.0,gcc還需要改什麼嗎?