diff options
| author | Matthew Maurer <mmaurer@google.com> | 2025-01-03 17:37:04 +0000 |
|---|---|---|
| committer | Masahiro Yamada <masahiroy@kernel.org> | 2025-01-11 02:36:36 +0900 |
| commit | 272f8a6d625a0cf7fba9c5af5202edc84dee326c (patch) | |
| tree | 66cc8300da8d3834b9fb21875b3d944590bc0b54 | |
| parent | e8639b7ef0f871753b4262ec0eacd3da29eebcee (diff) | |
Documentation/kbuild: Document storage of symbol information
Document where exported and imported symbols are kept, format options,
and limitations.
Signed-off-by: Matthew Maurer <mmaurer@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
| -rw-r--r-- | Documentation/kbuild/modules.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild/modules.rst index 101de236cd0c..a42f00d8cb90 100644 --- a/Documentation/kbuild/modules.rst +++ b/Documentation/kbuild/modules.rst @@ -423,6 +423,26 @@ Symbols From the Kernel (vmlinux + modules) 1) It lists all exported symbols from vmlinux and all modules. 2) It lists the CRC if CONFIG_MODVERSIONS is enabled. +Version Information Formats +--------------------------- + + Exported symbols have information stored in __ksymtab or __ksymtab_gpl + sections. Symbol names and namespaces are stored in __ksymtab_strings, + using a format similar to the string table used for ELF. If + CONFIG_MODVERSIONS is enabled, the CRCs corresponding to exported + symbols will be added to the __kcrctab or __kcrctab_gpl. + + If CONFIG_BASIC_MODVERSIONS is enabled (default with + CONFIG_MODVERSIONS), imported symbols will have their symbol name and + CRC stored in the __versions section of the importing module. This + mode only supports symbols of length up to 64 bytes. + + If CONFIG_EXTENDED_MODVERSIONS is enabled (required to enable both + CONFIG_MODVERSIONS and CONFIG_RUST at the same time), imported symbols + will have their symbol name recorded in the __version_ext_names + section as a series of concatenated, null-terminated strings. CRCs for + these symbols will be recorded in the __version_ext_crcs section. + Symbols and External Modules ---------------------------- |
