LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2003, 12:22 PM   #1
odomae
LQ Newbie
 
Registered: Jun 2003
Posts: 10

Rep: Reputation: 0
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 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
 
Old 06-24-2003, 04:03 PM   #2
skokodynski
LQ Newbie
 
Registered: Mar 2002
Posts: 3

Rep: Reputation: 0
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.
"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
g++ complains about global variables copolii Programming 3 09-18-2005 08:43 PM
Local vs Global variables wujee Programming 1 03-11-2005 11:43 PM
exporting global variables neo77777 Programming 6 09-18-2002 01:46 PM
extern variables in c++ abi_sh Programming 1 08-11-2002 01:42 PM
global environmental variables antadam Linux - General 2 10-11-2001 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration