Re: [PATCH] scripts/mksysmap: skip objtool __pfx_ symbols

David Laight
2025-04-15T17:39:43Z

On Sat, 12 Apr 2025 10:22:18 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

...
> I just hit this on my allyesconfig build:
>
> NM .tmp_vmlinux1.syms
> KSYMS .tmp_vmlinux1.kallsyms.S
> Symbol __cfi_snnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7n too long for kallsyms (517 >= 512).
> Please increase KSYM_NAME_LEN both in kernel and kallsyms.c
...
>
> I grepped for that symbol and it lives in: lib/tests/longest_symbol_kunit.o

Looks like it is carefully counted to be 511 characters.
And then the compiler adds __cfi_ making 517.
I guess the test could be changed?

Is it possible to remove the __cfi_ symbols (to save kernel memory) and then
use a single bit to indicate that the previous few bytes (the same number for
all such symbols) belong to the following symbol?
Then stack backtraces would say "foo-n" instead "__cfi_foo+n".

David