Re: Fwd: Re: Fwd: Re: how to load module to kernel core? (fwd)

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

 



>    I am trying to call a function which is defined in my module from msg.c 
> which is kernel core using
> 
> 
> >From: Daniele Bellucci <bellucda@tiscali.it>
> >
> >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.

Like he said, linking happens when it gets loaded. Use EXPORT_SYMBOL to 
export your function from msg.o. Then load msg.o first and then load 2nd 
module where you will be defining the required function as external.
(If msg.o is not a module, may be what you are trying is correct. But it 
was always easier for me to do this by exporting symbols)

--Sarin
PS: Sorry if this mail comes twice. I think my mail server is out of its 
senses.


--
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