public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* kernel modules
@ 2004-09-07 11:30 rinku rathore
  2004-09-07 15:07 ` Randy.Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: rinku rathore @ 2004-09-07 11:30 UTC (permalink / raw)
  To: Dirk Bergmann, gcc, gcc-help, Eljay Love-Jensen, lrtaylor,
	Majordomo, Matthias Stein, Zack Weinberg

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 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-07 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-07 11:30 kernel modules rinku rathore
2004-09-07 15:07 ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).