Hi,

How does EXPORT_SYMBOL work ?
All i know is that its a way by which a kernel module can export symbols to
other kernel modules.
Just to get more information on it, i looked for its definition(in
linux/module.h) and found that
its defined as:
#define EXPORT_SYMBOL(sym)             \
   __EXPORT_SYMBOL(sym, "")

where,
#define __EXPORT_SYMBOL(sym, sec)            \
   extern typeof(sym) sym;             \
   __CRC_SYMBOL(sym, sec)              \
   static const char __kstrtab_##sym[]       \
   __attribute__((section("__ksymtab_strings")))      \
   = MODULE_SYMBOL_PREFIX #sym;                       \
   static const struct kernel_symbol __ksymtab_##sym  \
   __attribute_used__               \
   __attribute__((section("__ksymtab" sec), unused))  \
   = { (unsigned long)&sym, __kstrtab_##sym }


please throw some light here for me to  understand this complex
substitution,
Also, EXPORT_SYMBOL_GPL seems to be a way to letting the modules Only under
GPL License
(MODULE_VERSION("GPL")) to be able to use the exported symbols ?


Thanks,
~amit

-- 
"Everyone has a photographic memory. Some people just don't have film."

— Mel Brooks

Reply via email to