Re: a question about EXPORT_SYMBOL

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

 



On Mon, Apr 24, 2006 at 11:22:27PM +0800, cheng long wrote:
> Hi, all !
> 
> What's happen when export a static function name, as follows?
> 
> static int func()
> {
>        return 1;
> }
> 
> EXPORT_SYMBOL(func);
> 
> Thanks
> 
> Regards,
> Cheng
Hi,

I think it will work. In fact, I'm sure because I've tested it. But
don't do that, it's not logic :)

In fact, the function EXPORT_SYMBOL creates a struct with the adress of
the function and puts it in the ksym table. So the function will be
avalaible, even if it's a static one.

Static is just an operator of visibilityof the variable (and it says
that the memory is persistent too but that's another problem)

Regards,
-- 
tyler
tyler@xxxxxxxx


	

	
		
___________________________________________________________________________ 
Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel. 
Rendez-vous sur http://fr.yahoo.com/set


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