From: Brian Gerst <bgerst@didntduck.org>
To: Ben Rush <brush@cse.unl.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Error Communicating With Module
Date: Mon, 12 Feb 2001 10:50:00 -0500 [thread overview]
Message-ID: <3A880628.F77E3ACA@didntduck.org> (raw)
In-Reply-To: <Pine.SGI.4.05.10102120911460.4669542-100000@cse.unl.edu>
Ben Rush wrote:
>
> 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 brush@cse.unl.edu.
> 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:
>
> EXPORT_SYMBOL(bens_variable);
>
> 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){
> printk(bens_variable);
> 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?
Turn module versioning off.
--
Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://vger.kernel.org/lkml/
next prev parent reply other threads:[~2001-02-12 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-12 15:21 Error Communicating With Module Ben Rush
2001-02-12 15:50 ` Brian Gerst [this message]
2001-02-12 16:22 ` Richard B. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A880628.F77E3ACA@didntduck.org \
--to=bgerst@didntduck.org \
--cc=brush@cse.unl.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox