Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

EXPORT_SYMB

sir ,

   i m new to this driver programming . i m on 2nd chapter of
 "linux device drivers " .

 i tried to do the following :


*********************************************** TEST.C **********


 # define MODULE
 # define __KERNEL__

 # define value 50
 # define EXPORT_SYMTAB

 
 MODULE_LISENCE("GPL");
 
 EXPORT_SYMBOL(value);


 int init_module (void)
 {
 }

 void cleanup_module(void)
 {
 }


*************************************************

i cant compile this with

 gcc -c test.c


there is some errors with EXPORT_SYMBOL line .
 wat is the error in my program ?
how can i export the variabe value so that i can view
 it in /proc/ksyms?
                     


         
 
0
karana
Asked:
karana
1 Solution
 
NovaDenizenCommented:
MODULE_LISENCE("GPL");
Shouldn't this be MODULE_LICENSE?
 
 EXPORT_SYMBOL(value);
Have you previously declared "value" ?

It would be useful if you gave more specific information than "there is some errors".  What did the compiler say?
0
 
karanaAuthor Commented:

sir ,


       thankx for ur comment . by trial and error menthos i found out that

         # define value 50
     should be
             int value 50


 then it works .








0
 
stefan73Commented:
Hi karana,
What are you trying to do in the first place?

Cheers!

Stefan
0
 
PAQ_ManCommented:
PAQed with points refunded (50)

PAQ_Man
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now