Chapter 9. Symbols

Table of Contents
EXPORT_SYMBOL() include/linux/module.h
EXPORT_SYMTAB

Within the kernel proper, the normal linking rules apply (ie. unless a symbol is declared to be file scope with the static keyword, it can be used anywhere in the kernel). However, for modules, a special exported symbol table is kept which limits the entry points to the kernel proper. Modules can also export symbols.

EXPORT_SYMBOL() include/linux/module.h

This is the classic method of exporting a symbol, and it works for both modules and non-modules. In the kernel all these declarations are often bundled into a single file to help genksyms (which searches source files for these declarations). See the comment on genksyms and Makefiles below.