Re: [PATCH v3] kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS
From: Linus Torvalds
Date: Sat Feb 01 2025 - 15:10:30 EST
On Sat, 1 Feb 2025 at 10:51, Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> This commit addresses the issue by leveraging modpost. Symbol names
> passed to symbol_get() are recorded in the special .no_trim_symbol
> section, which is then parsed by modpost to forcibly keep such symbols.
> The .no_trim_symbol section is discarded by the linker scripts, so there
> is no impact on the size of the final vmlinux or modules.
LGTM. And I still assume that I'll just get it in some future kbuild fixes pull.
Linus