[lkml]   [2001]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectError Communicating With Module
	Hello, first of all I must tell you that I do not belong to this
mailing list as of yet, so, please respond to me via
Thank you very much in advance!

My problem is as follows:

I have added a variable named bens_variable to ksyms.c as follows:

extern int bens_variable=10;
I have then exported the variable in ksyms.c as follows:

I then recompiled the kernel as bzImage and everything went
perfectly fine. I then wrote a module for that particular kernel which
is simple and looks as follows:

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

int init_module(void){
return 0;
void cleanup_module(void){
printk("<1>Module Unloaded\n");
But, of course, whenever I try and compile the module to load it
using gcc it tells me that bens_variable is undefined - which makes sense,
however I don't see how I can compile this without typing in

extern int bens_variable;
again. How do I get my module to compile and print out the value
of bens_variable as defined within ksyms.c?

Again, please respond to me via Thanks again in


Benjamin Rush (
Undergradute Computer Scientist @ UNL

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:13    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean