LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux 2.5.69 extern global variables (https://www.linuxquestions.org/questions/linux-newbie-8/linux-2-5-69-extern-global-variables-63431/)

odomae 06-03-2003 12:22 PM

Linux 2.5.69 extern global variables
 
Hi,

I am running Red Hat 7.2 and have have my sample kernel module compiled for linux 2.5.69.
when I try to insmod the kernel module, I get
"sample_module:o Invalid module format."
If I add __initdata in front of my global variables ( extern), this problem goes away. Can anyone help me out here? Has anyone else seen this problem?

Thanks

skokodynski 06-24-2003 04:03 PM

Taken from http://www.win.tue.nl/~aeb/linux/lk/lk-2.html#ss2.5.1 :
"
# insmod demo-module.o
Error inserting 'demo-module.o': -1 Invalid module format

The new module utilities require a module name section. Adding -DKBUILD_MODNAME=demo to the compile line suggested above solves this.
"


All times are GMT -5. The time now is 06:19 AM.