From: Petr Pavlu <petr.pavlu@suse.com>
To: Matthew Maurer <mmaurer@google.com>
Cc: "Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Naveen N Rao" <naveen@kernel.org>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Luis Chamberlain" <mcgrof@kernel.org>,
"Petr Pavlu" <petr.pavlu@suse.com>,
"Sami Tolvanen" <samitolvanen@google.com>,
"Daniel Gomez" <da.gomez@samsung.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Jonathan Corbet" <corbet@lwn.net>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org,
rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v10 4/5] Documentation/kbuild: Document storage of symbol information
Date: Mon, 16 Dec 2024 14:25:33 +0100 [thread overview]
Message-ID: <e522ec59-6ee6-4c11-8a4f-91a683e6435c@suse.com> (raw)
In-Reply-To: <20241123-extended-modversions-v10-4-0fa754ffdee3@google.com>
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
> ----------------------------
>
>
--
Thanks,
Petr
next prev parent reply other threads:[~2024-12-16 13:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-23 2:42 [PATCH v10 0/5] Extended MODVERSIONS Support Matthew Maurer
2024-11-23 2:42 ` [PATCH v10 1/5] modules: Support extended MODVERSIONS info Matthew Maurer
2024-11-25 11:25 ` Michael Ellerman
2024-11-25 14:30 ` Matthew Maurer
2024-11-23 2:42 ` [PATCH v10 2/5] modpost: Produce extended MODVERSIONS information Matthew Maurer
2024-11-23 2:42 ` [PATCH v10 3/5] modules: Allow extended modversions without basic MODVERSIONS Matthew Maurer
2024-11-23 2:42 ` [PATCH v10 4/5] Documentation/kbuild: Document storage of symbol information Matthew Maurer
2024-12-16 13:25 ` Petr Pavlu [this message]
2024-11-23 2:42 ` [PATCH v10 5/5] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS Matthew Maurer
2024-11-25 23:25 ` [PATCH v10 0/5] Extended MODVERSIONS Support Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e522ec59-6ee6-4c11-8a4f-91a683e6435c@suse.com \
--to=petr.pavlu@suse.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=christophe.leroy@csgroup.eu \
--cc=corbet@lwn.net \
--cc=da.gomez@samsung.com \
--cc=gary@garyguo.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mmaurer@google.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=naveen@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=npiggin@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox