A
alice
hi all,
First of all I would apologize in case this the wrong group for
posting this article.
I'm trying to write small Linux kernel modules.I compile them with the
following command
gcc -c test.c
which produces the file test.o
Now when I tries to load the module using insmod command it gives the
following error
message-
test.o: kernel-module version mismatch
test.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8(custom)
Id tried to disable the version support from my kernel by compiling it
as follows-
Id marked Y for the kernel module version
information(CONFIG_MODCONVERSIONS).
However,Im not sure that whether the new Kernel which I'd booted
really does have the
version information disabled as it is also giving the same error on
using the insmod
command.
Here is the file test.c:
#include<linux/config.h>
#if defined(CONFIG_MODCONVERSIONS) && !defined(MODVERSIONS)
# define MODVERSIONS
#endif
#ifdef MODVERSIONS
# include <linux/modversions.h>
#endif
#define MODULE
#include<linux/module.h>
int init_module(void){
printk("this is a test\n");
return 0;
}
void cleanup_module(void){
printk("bye!\n");
return ;
}
First of all I would apologize in case this the wrong group for
posting this article.
I'm trying to write small Linux kernel modules.I compile them with the
following command
gcc -c test.c
which produces the file test.o
Now when I tries to load the module using insmod command it gives the
following error
message-
test.o: kernel-module version mismatch
test.o was compiled for kernel version 2.4.20
while this kernel is version 2.4.20-8(custom)
Id tried to disable the version support from my kernel by compiling it
as follows-
Id marked Y for the kernel module version
information(CONFIG_MODCONVERSIONS).
However,Im not sure that whether the new Kernel which I'd booted
really does have the
version information disabled as it is also giving the same error on
using the insmod
command.
Here is the file test.c:
#include<linux/config.h>
#if defined(CONFIG_MODCONVERSIONS) && !defined(MODVERSIONS)
# define MODVERSIONS
#endif
#ifdef MODVERSIONS
# include <linux/modversions.h>
#endif
#define MODULE
#include<linux/module.h>
int init_module(void){
printk("this is a test\n");
return 0;
}
void cleanup_module(void){
printk("bye!\n");
return ;
}