0

I am new to the linux kernel. I have searched a little bit of EXPORT_SYMBOL but I still get a little confused. I know it's used to export a variable or function defined in one module to another module. Does that mean by using that, we do not need to include any header file that declares that variable or function? Or are they both needed? If both needed , why do we need to have EXPORT_SYMBOL? Thanks,

Hao Shen
  • 2,257
  • 2
  • 32
  • 60

1 Answers1

1

Header files are for the compiler. EXPORT_SYMBOL is for the module loader. This allows for proper separation of module code from kernel code.

Community
  • 1
  • 1
Ignacio Vazquez-Abrams
  • 699,552
  • 132
  • 1,235
  • 1,283
  • Thx.So that means I have two options. One is to use a header file and the other one is to first declaring and then use it in the source file:> – Hao Shen Jun 29 '12 at 17:21