Wednesday, November 17, 2021

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

Issue

from here

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

I am not getting whats the meaning of it and why that is used. I tried to search about it but not understanding the meaning of that.


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.



Answered By - cnicutar