From: Masahiro Yamada <masahiroy@kernel.org> To: Mark Brown <broonie@kernel.org> Cc: Michal Marek <michal.lkml@markovi.net>, Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] kbuild: modpost: Explicitly warn about unprototyped symbols Date: Sat, 5 Jun 2021 23:19:44 +0900 [thread overview] Message-ID: <CAK7LNAR6bXXk9-ZzZYpTqzFqdYbQsZHmiWspu27rtsFxvfRuVA@mail.gmail.com> (raw) In-Reply-To: <20210604153611.52209-1-broonie@kernel.org> On Sat, Jun 5, 2021 at 12:36 AM Mark Brown <broonie@kernel.org> wrote: > > One common cause of modpost version generation failures is is a failure to double "is" > prototype exported assembly functions - the tooling requires this for > exported functions even if they are not and should not be called from C > code in order to do the version mangling for symbols. Unfortunately the > error message is currently rather abstruse, simply saying that "version > generation failed" and even diving into the code doesn't directly show > what's going on since there's several steps between the problem and it > being observed. > > Provide an explicit hint as to the likely cause of a version generation > failure to help anyone who runs into this in future more readily diagnose > and fix the problem. > > Signed-off-by: Mark Brown <broonie@kernel.org> > --- > scripts/mod/modpost.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 3e623ccc020b..78553f95c250 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -662,6 +662,8 @@ static void handle_modversion(const struct module *mod, > if (sym->st_shndx == SHN_UNDEF) { > warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", > symname, mod->name, mod->is_vmlinux ? "" : ".ko"); > + warn("Is \"%s\" prototyped in asm/asm-prototypes.h?\n", > + symname); May I ask for small changes? Could you enclose the header with angle bralets, like this <asm/asm-protytypes.h> ? These two sentences are related, so could you merge them into a single warn() call, like this ? warn("EXPORT symbol \"%s\" [%s%s] version ...\n", "Is \"%s\" prototyped in <asm/asm-prototypes.h>?\n", symname, mod->name, mod->is_vmlinux ? "" : ".ko", modname); > return; > } > > -- > 2.20.1 > -- Best Regards Masahiro Yamada
prev parent reply other threads:[~2021-06-05 14:20 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-04 15:36 Mark Brown 2021-06-05 14:19 ` Masahiro Yamada [this message]
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=CAK7LNAR6bXXk9-ZzZYpTqzFqdYbQsZHmiWspu27rtsFxvfRuVA@mail.gmail.com \ --to=masahiroy@kernel.org \ --cc=broonie@kernel.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michal.lkml@markovi.net \ --subject='Re: [PATCH] kbuild: modpost: Explicitly warn about unprototyped symbols' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.