Skip to content

Commit 272f8a6

Browse files
maurermasahir0y
authored andcommitted
Documentation/kbuild: Document storage of symbol information
Document where exported and imported symbols are kept, format options, and limitations. Signed-off-by: Matthew Maurer <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent e8639b7 commit 272f8a6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Documentation/kbuild/modules.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,26 @@ Symbols From the Kernel (vmlinux + modules)
423423
1) It lists all exported symbols from vmlinux and all modules.
424424
2) It lists the CRC if CONFIG_MODVERSIONS is enabled.
425425

426+
Version Information Formats
427+
---------------------------
428+
429+
Exported symbols have information stored in __ksymtab or __ksymtab_gpl
430+
sections. Symbol names and namespaces are stored in __ksymtab_strings,
431+
using a format similar to the string table used for ELF. If
432+
CONFIG_MODVERSIONS is enabled, the CRCs corresponding to exported
433+
symbols will be added to the __kcrctab or __kcrctab_gpl.
434+
435+
If CONFIG_BASIC_MODVERSIONS is enabled (default with
436+
CONFIG_MODVERSIONS), imported symbols will have their symbol name and
437+
CRC stored in the __versions section of the importing module. This
438+
mode only supports symbols of length up to 64 bytes.
439+
440+
If CONFIG_EXTENDED_MODVERSIONS is enabled (required to enable both
441+
CONFIG_MODVERSIONS and CONFIG_RUST at the same time), imported symbols
442+
will have their symbol name recorded in the __version_ext_names
443+
section as a series of concatenated, null-terminated strings. CRCs for
444+
these symbols will be recorded in the __version_ext_crcs section.
445+
426446
Symbols and External Modules
427447
----------------------------
428448

0 commit comments

Comments
 (0)