From: Andi Kleen <andi@firstfloor.org>
To: dwmw@amazon.co.uk
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
tim.c.chen@linux.intel.com, tglx@linutronix.de,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH] retpoline/modpost: Quieten MODVERSION retpoline build
Date: Fri, 5 Jan 2018 10:28:59 -0800 [thread overview]
Message-ID: <20180105182859.20458-1-andi@firstfloor.org> (raw)
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
reply other threads:[~2018-01-05 18:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180105182859.20458-1-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=dwmw@amazon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).