From: Steve Muckle <smuckle@google.com>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Nicolas Schier <nicolas@fjasle.eu>,
Alexander Lobakin <alobakin@pm.me>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [PATCH] kbuild: Ignore __this_module in gen_autoksyms.sh
Date: Thu, 16 Jun 2022 15:19:28 -0700 [thread overview]
Message-ID: <936c9eea-d687-d4ce-b5a4-0e7f7ee3b714@google.com> (raw)
In-Reply-To: <20220616195759.3214538-1-samitolvanen@google.com>
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@google.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@google.com>
next prev parent reply other threads:[~2022-06-16 22:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 19:57 Sami Tolvanen
2022-06-16 22:19 ` Steve Muckle [this message]
2022-06-17 17:28 ` Nick Desaulniers
2022-06-17 18:14 ` Ramji Jiyani
2022-06-18 6:17 ` Sedat Dilek
2022-06-18 22:59 ` Masahiro Yamada
2022-06-21 15:37 ` Sami Tolvanen
2022-06-23 19:34 ` Masahiro Yamada
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=936c9eea-d687-d4ce-b5a4-0e7f7ee3b714@google.com \
--to=smuckle@google.com \
--cc=alobakin@pm.me \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=samitolvanen@google.com \
/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®