* [PATCH] retpoline/modpost: Quieten MODVERSION retpoline build
@ 2018-01-05 18:28 Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2018-01-05 18:28 UTC (permalink / raw)
To: dwmw; +Cc: linux-kernel, torvalds, tim.c.chen, tglx, Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
The internal retpoline thunks used by the compiler contain a dot.
They have to be exported, but modversions cannot handle them
it because they don't have a prototype due to the C incompatible
name (and it doesn't support asm("..."))
This leads to lots of warnings from modpost with a retpoline
build with MODVERSIONS enabled. The actual symbols load fine,
they just don't get versioned. That's not a problem here
because we don't expect them to change ever.
Quieten the respective warning messages in modpost for any
symbols containing a dot.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
scripts/mod/modpost.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6510536c06df..7a06d2032ecf 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -693,7 +693,9 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
#endif
if (is_crc) {
const char *e = is_vmlinux(mod->name) ?"":".ko";
- warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", symname + strlen(CRC_PFX), mod->name, e);
+ const char *name = symname + strlen(CRC_PFX);
+ if (!strchr(name, '.'))
+ warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", name, mod->name, e);
}
mod->unres = alloc_symbol(symname,
ELF_ST_BIND(sym->st_info) == STB_WEAK,
@@ -2220,7 +2222,7 @@ static int add_versions(struct buffer *b, struct module *mod)
for (s = mod->unres; s; s = s->next) {
if (!s->module)
continue;
- if (!s->crc_valid) {
+ if (!s->crc_valid && !strchr(s->name, '.')) {
warn("\"%s\" [%s.ko] has no CRC!\n",
s->name, mod->name);
continue;
--
2.14.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-05 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 18:28 [PATCH] retpoline/modpost: Quieten MODVERSION retpoline build Andi Kleen
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®