[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210604153611.52209-1-broonie@kernel.org>
Date: Fri, 4 Jun 2021 16:36:11 +0100
From: Mark Brown <broonie@...nel.org>
To: Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: [PATCH] kbuild: modpost: Explicitly warn about unprototyped symbols
One common cause of modpost version generation failures is is a failure to
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@...nel.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);
return;
}
--
2.20.1
Powered by blists - more mailing lists