Message ID | 20241123-extended-modversions-v10-4-0fa754ffdee3@google.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Extended MODVERSIONS Support | expand |
Context | Check | Description |
---|---|---|
mcgrof/vmtest-modules-next-VM_Test-1 | success | Logs for Run CI tests |
mcgrof/vmtest-modules-next-VM_Test-0 | success | Logs for Run CI tests |
mcgrof/vmtest-modules-next-VM_Test-5 | success | Logs for setup / Setup kdevops environment |
mcgrof/vmtest-modules-next-VM_Test-4 | success | Logs for setup / Setup kdevops environment |
mcgrof/vmtest-modules-next-PR | success | PR summary |
mcgrof/vmtest-modules-next-VM_Test-2 | success | Logs for cleanup / Archive results and cleanup |
mcgrof/vmtest-modules-next-VM_Test-3 | success | Logs for cleanup / Archive results and cleanup |
On 11/23/24 03:42, Matthew Maurer wrote: > Document where exported and imported symbols are kept, format options, > and limitations. > > Signed-off-by: Matthew Maurer <mmaurer@google.com> > --- > Documentation/kbuild/modules.rst | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild/modules.rst > index 101de236cd0c9abe1f5684d80063ff3f9a7fc673..c32e3ed67cd26070f6929f6ad98c4308a1ab71f8 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 __kstrtab and > + __kstrtabns respectively, 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. The second sentence should be that symbol names and namespaces of exported symbols are both stored in the __ksymtab_strings section. > + > + 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 > ---------------------------- > >
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild/modules.rst index 101de236cd0c9abe1f5684d80063ff3f9a7fc673..c32e3ed67cd26070f6929f6ad98c4308a1ab71f8 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 __kstrtab and + __kstrtabns respectively, 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 ----------------------------
Document where exported and imported symbols are kept, format options, and limitations. Signed-off-by: Matthew Maurer <mmaurer@google.com> --- Documentation/kbuild/modules.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)