This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
kernel modules
- From: rinku rathore <rinku_ques at yahoo dot com>
- To: Dirk Bergmann <D dot Bergmann at gom dot com>, gcc <gcc at gcc dot gnu dot org>, gcc-help <gcc-help at gcc dot gnu dot org!>, Eljay Love-Jensen <eljay at adobe dot com>, lrtaylor <lrtaylor at micron dot com>, Majordomo <majordomo at vger dot kernel dot org>, Matthias Stein <M dot Stein at gom dot com>, Zack Weinberg <zack at codesourcery dot com>
- Date: Tue, 7 Sep 2004 04:30:19 -0700 (PDT)
- Subject: kernel modules
Hello,
I am trying to build a kernel module that is:-
/*module name is "hello.c"*/
#include <linux/module.h>// Needed by all
modules
#include <linux/kernel.h>
int init_module(void)
{
printk("<1>Hello world 1.\n");
// A non 0 return means init_module failed;
module can't be loaded.
return 0;
}
void cleanup_module(void)
{
printk("<1>Goodbye world 1.\n");
}
And then compiling it with the command:-
gcc -c hello.c
it get successfully compiled and then I am trying to
insert it with command
insmod ./hello.o
An error as followed is arived how can I remove this
error:-
error: ./hell.o: couldn't find the kernel version the
module was compiled for
Thanx Rinku Rathore
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail