Re: [PATCH 1/2] kallsyms: add symbol size for kallsyms symbols that can change size
André Draszik <[email protected]>
| Newsgroups | gmane.linux.kbuild.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Geert, On Mon, 2026-08-24 at 14:26 +0200, Geert Uytterhoeven wrote: > 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% I suppose the reason is that before the patch each of the above 4 symbols' size was recorded as 0 in the ELF file by the assembler. With this patch, the assembler places the actual size for each symbol. Hence they appear to have grown, but in reality they haven't. Looking at the delta between each of the symbol's start address with and without the patch should confirm that, too. Cheers, Andre'