i issued the command
insmod hello.o
the result was:
[root@localhost modules]# insmod hello.o
Warning: loading hello.o will taint the kernel: no license
See
http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module hello loaded, with warnings
then changed my hello.c to include the fallowing at the end of my c file
MODULE_LICENSE("GPL");
MODULE_AUTHOR("VENKATESH");
then it was fallowed by this:
[root@localhost modules]# gcc hello.c
errors reported were:
hello.c: In function `hello_init':
hello.c:11: error: `KERN_ALERT' undeclared (first use in this function)
hello.c:11: error: (Each undeclared identifier is reported only once
hello.c:11: error: for each function it appears in.)
hello.c:11: error: syntax error before string constant
hello.c: In function `hello_exit':
hello.c:18: error: `KERN_ALERT' undeclared (first use in this function)
hello.c:18: error: syntax error before string constant
wt is the gcc command to include source to kernel dir...
my hello.c file is in /venki/modules/ and kernel path is /usr/src/linux-2.4.22
my friend was suggesting me to use -c option to compile is it ok to use -c option that is gcc -c hello.c can i use this command