[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <936c9eea-d687-d4ce-b5a4-0e7f7ee3b714@google.com>
Date: Thu, 16 Jun 2022 15:19:28 -0700
From: Steve Muckle <smuckle@...gle.com>
To: Sami Tolvanen <samitolvanen@...gle.com>
Cc: Nicolas Schier <nicolas@...sle.eu>,
Alexander Lobakin <alobakin@...me>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH] kbuild: Ignore __this_module in gen_autoksyms.sh
On 6/16/22 12:57, Sami Tolvanen wrote:
> Module object files can contain an undefined reference to __this_module,
> which isn't resolved until we link the final .ko. The kernel doesn't
> export this symbol, so ignore it in gen_autoksyms.sh. This avoids an
> unnecessary vmlinux rebuild with UNUSED_KSYMS_WHITELIST when we have a
> symbol list that already contains all the module dependencies.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@...gle.com>
> ---
> scripts/gen_autoksyms.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh
> index faacf7062122..653fadbad302 100755
> --- a/scripts/gen_autoksyms.sh
> +++ b/scripts/gen_autoksyms.sh
> @@ -56,4 +56,7 @@ EOT
> # point addresses.
> sed -e 's/^\.//' |
> sort -u |
> +# Ignore __this_module. It's not an exported symbol, and will be resolved
> +# when the final .ko's are linked.
> +grep -v '^__this_module$' |
> sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file"
Tested-by: Steve Muckle <smuckle@...gle.com>
Powered by blists - more mailing lists