Hi PLUG, 

I have a problem with loading a miodule into tha kernel using "insmod"


can any one help me in this matter ?

I have checked every thing regarding this, 

firstly i have complied the file sample.c

####################################

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

int init_module (void) { printk ( "<1> HELLO WORLD\n"); return 0;}
void cleanup_module(void) { printk ( "<1> BYE WORLD\n "); }

####################################

# gcc -c sample.c
 i got the object file as sample.o 
but when i try to load that module into kernel it gives me an error
saying the following ::

#insmod sample.o
insmod: error inserting 'sample.o': -1 Invalid module format

I read some where that 2.6 doesnt support the '.o' extension and only
supports '.ko' extension so i build the object as 'sample.ko' but
still i am unable to load my module into the kernel. i get the same
error :

#insmod sample.ko
insmod: error inserting 'sample.ko': -1 Invalid module format

Kindly help me in this matter. 
Many thanks for any help in this matter.


Thanks and Regards,
Phani.

--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List:      (plug-mail@plug.org.in)
List Information:  http://plug.org.in/mailing-list/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.

Reply via email to