clinux-kernel

What's meaning of "EXPORT_SYMBOL" in Linux kernel code?


From here

 48 struct snd_card *snd_cards[SNDRV_CARDS];
 49 EXPORT_SYMBOL(snd_cards);

I do not understand what's the meaning of it and why that is used. I tried to search about it but did not understand the meaning of it.


Solution

  • It makes a symbol accessible to dynamically loaded modules (provided that said modules add an extern declaration).

    Not long ago, someone asked how to use it.