Re: Fwd: Re: Fwd: Re: Fwd: Re: how to load module to kernel core?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Praveen, 

You can export a variable by using:
        EXPORT_SYMBOL(variable_name);
or,     EXPORT_SYMBOL_NOVERS(variable_name);

in the file where it is defined (or anywhere this variable is
accessible).
Besides, you need to use -DEXPORT_SYMTAB flag for the file where you use
EXPORT_SYMBOL macro. All this is inside kernel.

Then you can just declare the variable in your module code and use it.
It should be visible there.

cheers,
Deepankar.


On Tue, 2003-05-27 at 16:49, praveen praveen wrote:
> 
>   Ravi can you tell me how to load symbols or any links.how can i access the 
> symbol table entries.
> 
>    thanks in advance.
> 
> >From: Ravi <ravivsn@roc.co.in>
> >To: praveen praveen <prav_6@hotmail.com>
> >CC: kernelnewbies@nl.linux.org
> >Subject: Re: Fwd: Re: Fwd: Re: how to load module to kernel core?
> >Date: Tue, 27 May 2003 13:25:35 +0530
> >
> >I guess there is a problem in symbol table loading.
> >You need to load symbols to proceed
> >Ravi
> >
> >praveen praveen wrote:
> >>
> >>   I am trying to call a function which is defined in my module from msg.c 
> >>which is kernel core using
> >>
> >>   a function pointer.
> >>
> >>    so when i  insmod ,it is giving the function pointer as unresolved 
> >>symbol. see the code below
> >>
> >>    you will understand.
> >>
> >>>From: Daniele Bellucci <bellucda@tiscali.it>
> >>>To: "praveen praveen" <prav_6@hotmail.com>
> >>>Subject: Re: Fwd: Re: how to load module to kernel core?
> >>>Date: Mon, 26 May 2003 21:03:09 +0200
> >>>
> >>>On Mon 26 May 2003 20:54, praveen praveen wrote:
> >>> >     I used the kernel compiling options also.my problem is i have load 
> >>>my
> >>> > module with the kernel
> >>> >
> >>> >     core i.e link it with the msg.o file before calling insmod 
> >>>command.
> >>> >
> >>>
> >>>Could you explain better what are you tring to do?
> >>>
> >>>If you're writing a kernel module, you don't need any  linkage  becuase 
> >>>this operation is performed during module loading.
> >>>
> >>>
> >>>-------------------------------------------------------------------------------------------------------------------------------------------------------------
> >>>
> >>>PGP PKEY      
> >>>http://pgp.mit.edu:11371/pks/lookup?search=belch76@libero.it&op=index
> >>>ICQ#               104896040
> >>>Netphone/Fax  178.605.7063
> >>>Homepage       http://web.tiscali.it/bellucda
> >>>-------------------------------------------------------------------------------------------------------------------------------------------------------------
> >>>
> >>>
> >>>Daniele Bellucci
> >>>
> >>>
> >>>
> >>
> >>_________________________________________________________________
> >>Staying fit. It's about being happy! 
> >>http://server1.msn.co.in/features/stayingfit/index.asp Check out the new 
> >>mantra.
> >>
> >>--
> >>Kernelnewbies: Help each other learn about the Linux kernel.
> >>Archive:       http://mail.nl.linux.org/kernelnewbies/
> >>FAQ:           http://kernelnewbies.org/faq/
> >>
> >
> >
> >--
> >
> >
> >The views presented in this mail are completely mine. The company is not
> >responsible for whatsoever.
> >------------------------------------------------------------------------
> >Ravi Kumar CH
> >Rendezvous On Chip (i) Pvt Ltd
> >Hyderabad, India
> >Ph: +91-40-2335 1214 / 1175 / 1184
> >
> >ROC home page <http://www.roc.co.in>
> >
> >
> >
> >--
> >Kernelnewbies: Help each other learn about the Linux kernel.
> >Archive:       http://mail.nl.linux.org/kernelnewbies/
> >FAQ:           http://kernelnewbies.org/faq/
> >
> 
> _________________________________________________________________
> Himalayan holiday! Waiting to be won. 
> http://server1.msn.co.in/sp03/summerfun/index.asp Find out more.
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux