From: "André Draszik" <andre.draszik@linaro.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Peter Griffin <peter.griffin@linaro.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Juan Yescas <jyescas@google.com>,
Guenter Roeck <linux@roeck-us.net>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH 1/2] kallsyms: add symbol size for kallsyms symbols that can change size
Date: Mon, 24 Aug 2026 14:36:16 +0100 [thread overview]
Message-ID: <73b681a103cecd66fe122cc225b08d529c2ed56d.camel@linaro.org> (raw)
In-Reply-To: <CAMuHMdWEzs=+vuV0oX+v2WVukHNg+o5FspczHyZggY4ADHJKqA@mail.gmail.com>
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 <andre.draszik@linaro.org> 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 <andre.draszik@linaro.org>
>
> 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'
next prev parent reply other threads:[~2026-08-24 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 12:42 [PATCH 0/2] kbuild: link-vmlinux.sh: more reliable 3rd pass linking André Draszik
2026-07-28 12:42 ` [PATCH 1/2] kallsyms: add symbol size for kallsyms symbols that can change size André Draszik
2026-08-24 12:26 ` Geert Uytterhoeven
2026-08-24 13:36 ` André Draszik [this message]
2026-08-24 13:47 ` Geert Uytterhoeven
2026-07-28 12:42 ` [PATCH 2/2] kbuild: link-vmlinux.sh: improve detection of third pass requirement André Draszik
2026-07-31 23:22 ` [PATCH 0/2] kbuild: link-vmlinux.sh: more reliable 3rd pass linking Nathan Chancellor
2026-08-03 14:11 ` Nicolas Schier
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=73b681a103cecd66fe122cc225b08d529c2ed56d.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=geert@linux-m68k.org \
--cc=justinstitt@google.com \
--cc=jyescas@google.com \
--cc=kernel-team@android.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nsc@kernel.org \
--cc=peter.griffin@linaro.org \
--cc=tudor.ambarus@linaro.org \
/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
all inboxes | Powered by JetHome®