Re: [PATCH 1/2] kallsyms: add symbol size for kallsyms symbols that can change size
Geert Uytterhoeven <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kbuild.devel |
|---|---|
| Message-ID | <CAMuHMdWEzs=+vuV0oX+v2WVukHNg+o5FspczHyZggY4ADHJKqA@mail.gmail.com> |
Hi André, On Tue, 28 Jul 2026 at 14:52, André Draszik <[email protected]> wrote: > Add symbol size for kallsyms symbols that can change size so that sizes > can be determined easily without having to manually calculate them > when inspecting the object files (.tmp_vmlinux?.kallsyms.o or > .tmp_vmlinux?). Without, the assembler records the symbol size as 0. > > This is primarily useful as a debugging aid in case of linker errors as > part of link-vmlinux.sh, and because symbol size doesn't have to align > with the offset to the next symbol due to padding/alignment. > > Signed-off-by: André Draszik <[email protected]> Thanks for your patch, which is now commit d6bf11a7e8a86135 ("kallsyms: add symbol size for kallsyms symbols that can change size") upstream. FTR, this commit has a huge impact on kernel size, according to bloat-o-meter: $ bloat-o-meter vmlinux.{old,} add/remove: 4/0 grow/shrink: 0/0 up/down: 440264/0 (440264) Function old new delta kallsyms_names - 324543 +324543 kallsyms_offsets - 114424 +114424 kallsyms_token_table - 849 +849 kallsyms_markers - 448 +448 Total: Before=5085496, After=5525760, chg +8.66% However, this seems to be totally bogus, and thus a false-positive: $ size vmlinux.{old,} text data bss dec hex filename 4520823 1507876 154960 6183659 5e5aeb /tmp/vmlinux.old 4520823 1507876 154960 6183659 5e5aeb /tmp/vmlinux $ ls -l vmlinux.{old,} -rwxrwxr-x 1 geert geert 7922796 aug 24 14:18 /tmp/vmlinux.old* -rwxrwxr-x 1 geert geert 7922796 aug 24 14:19 /tmp/vmlinux* I also see no change in memory consumption after boot-up, so everything is good... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds