kernel-module version missmatch !??????

From: Martin Huang (martin_at_bi.com.tw)
Date: 08/31/03


Date: Sun, 31 Aug 2003 20:12:42 +0800

Hi:
     I tried to compile this program:

#define MODULE
#include <linux/module.h>

int init_module (void) /* Loads a module in the kernel */
{
printk("Hello kernel n");
return 0;
}

void cleanup_module(void) /* Removes module from kernel */
{
printk("GoodBye Kerneln");
}

by typing:

# gcc -c hello.c
# insmod hello.o

however, I got an error message saying "kernel-module version missmatch,
hello.o was compiled for kernel version 2.4.9-9,

while this kernel is version 2.4.18-14"............

What should I do ? Upgrade gcc???

I am using RedHat Linux 8.0

 Thanx

Martin



Relevant Pages

  • Re: system gets stuck in a lock during boot
    ... on the latest kernel and seeing whether that fixes the lockup? ... 'backtrack' the bisection, ... At the moment I don't have a problem applying a patch to the ... gcc version: 4.5.0 20090730 ...
    (Linux-Kernel)
  • Re: system gets stuck in a lock during boot
    ... on the latest kernel and seeing whether that fixes the lockup? ... 'backtrack' the bisection, ... At the moment I don't have a problem applying a patch to the ... gcc version: 4.5.0 20090730 ...
    (Linux-Kernel)
  • Re: system gets stuck in a lock during boot
    ... on the latest kernel and seeing whether that fixes the lockup? ... 'backtrack' the bisection, ... At the moment I don't have a problem applying a patch to the ... gcc version: 4.5.0 20090730 ...
    (Linux-Kernel)
  • Re: [patch] measurements, numbers about CONFIG_OPTIMIZE_INLINING=y impact
    ... Maybe the kernel's backtrace code should be fixed instead of blaming ... Guess how big it is for the kernel? ... after I saw the gcc people talking negatively about the latest brouhaha. ... kernel backtrace debugging is different from regular user mode debugging? ...
    (Linux-Kernel)
  • [rfc] built-in native compiler for Linux?
    ... Perhaps we should fork off gcc and ship Linux with its own ... This way we can optimize it for the kernel and not worry ... I didnt suggest forking GCC. ... What i think makes sense is to build a _new_ precompiler / compiler ...
    (Linux-Kernel)