suse 2.6.5 insmod: error inserting 'kprobe.o': -1 Invalid module format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have written a tiny kernel module (see below)
It compiles fine and generates kprobe.o without any
warning. But when i do insmod, it gives error:
# insmod kprobe.o
insmod: error inserting 'kprobe.o': -1 Invalid module
format

Any idea why this is happening ?
I am using gcc-3.3.3

gcc -nostdinc -fno-strict-aliasing
-fomit-frame-pointer -Wall -O2
-I/local/oracle/linux-2.6.5-7.162/include -I
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/include
-DMODULE -DLINUX -D__KERNEL__ -o kprobe.o -c kprobe.c

kprobe.c:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>

static int __init kprobe_init (void)
{
        printk("module kprobe loading");
        return 0;
}

static void __exit kprobe_exit (void)
{
        printk("module kprobe exiting");
}

module_init(kprobe_init);
module_exit(kprobe_exit);
MODULE_LICENSE ("GPL");

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux