summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-06-07 15:02:06 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2021-06-17 10:01:05 +0900
commit4a6795933a890d41504c6df04527d1e093a4cbe6 (patch)
tree4ccdaad75aea83dd5957f9155524a8454013d77f /scripts
parent74ee585b7eecd98be3650e677625a0ee588d08e0 (diff)
kbuild: modpost: Explicitly warn about unprototyped symbols
One common cause of modpost version generation failures 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@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 3e623ccc020b..270a7df898e2 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -660,8 +660,11 @@ static void handle_modversion(const struct module *mod,
unsigned int crc;
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("EXPORT symbol \"%s\" [%s%s] version ...\n"
+ "Is \"%s\" prototyped in <asm/asm-prototypes.h>?\n",
+ symname, mod->name, mod->is_vmlinux ? "" : ".ko",
+ symname);
+
return;
}