kallsyms: support "big" kernel symbols
authorMiguel Ojeda <ojeda@kernel.org>
Mon, 5 Apr 2021 02:58:39 +0000 (04:58 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Sun, 16 Jan 2022 23:39:22 +0000 (00:39 +0100)
commit80783c83f50f4dd01b78b50c8cc86835967b19fe
tree37cf14aaf1acd750a83d6f58078841e3c9628bcc
parentdf0cc57e057f18e44dac8e6c18aba47ab53202f9
kallsyms: support "big" kernel symbols

Rust symbols can become quite long due to namespacing introduced
by modules, types, traits, generics, etc.

Increasing to 255 is not enough in some cases, and therefore
we need to introduce longer lengths to the symbol table.

In order to avoid increasing all lengths to 2 bytes (since most
of them are small, including many Rust ones), we use ULEB128 to
keep smaller symbols in 1 byte, with the rest in 2 bytes.

Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Co-developed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Co-developed-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
kernel/kallsyms.c
scripts/kallsyms.c