insmod: cannot insert `/lib/modules/2.6.16-uc0/kernel/drivers/misc/hello.ko': Invalid module format (-1): Exec format error
modprobe: failed to load module hello
I have the same problem!
If you comment out the whole if (vma->vm_file) {} block in do_mmap_private(), then the function will make a private copy and modules seem to insert ok.
In my linux-2.6.x/mm/nommu.c file there seems not to be any do_mmap_private function... :-( Anyway... is a little strange that the error could be in the nommu.c, isn't it? Because if it were, it should fail to everybody... I think.
I have a question regarding the Makefile posted by wgoosens. I've tried to compile a module with this makefile, but it seems to me that there is something missing in it, because when I try to run make, it says
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
make -k all
make: Nothing to be done for `all'.[/b]
--- Quote End ---
Maybe it's very simple, but I don't know what to add. To my eyes, it seems that I should add the objects to be compiled, for example, but I don't exactly how to do it.
What am I missing?
Thank you
AleX