public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andi Kleen <ak@linux.intel.com>
Cc: Nicolas Pitre <nico@linaro.org>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 4/7] [HACK] lto: shut up some warnings
Date: Fri,  2 Feb 2018 17:21:01 +0100	[thread overview]
Message-ID: <20180202162104.2300532-4-arnd@arndb.de> (raw)
In-Reply-To: <20180202161550.2106846-1-arnd@arndb.de>

Building with LTO currently causes some annoying warnings:

WARNING: modpost: missing MODULE_LICENSE() in drivers/vhost/vhost_scsi.o
see include/linux/module.h for more information
kallsyms failure: relative symbol value 0xffffffff81000000 out of range in relative mode

The modpost warning is a false-positive, the other one is so far
unknown. Both need a proper fix.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/kallsyms.c    | 2 +-
 scripts/mod/modpost.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 9ee9bf7fd1a2..e13227898d0b 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -395,7 +395,7 @@ static void write_src(void)
 				offset = relative_base - table[i].addr - 1;
 				overflow = (offset < INT_MIN || offset >= 0);
 			}
-			if (overflow) {
+			if (0 && overflow) {
 				fprintf(stderr, "kallsyms failure: "
 					"%s symbol value %#llx out of range in relative mode\n",
 					symbol_absolute(&table[i]) ? "absolute" : "relative",
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 49dfcd556c78..87c4404dad48 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -867,6 +867,7 @@ static const char *const section_white_list[] =
 static void check_section(const char *modname, struct elf_info *elf,
 			  Elf_Shdr *sechdr)
 {
+#if 0
 	const char *sec = sech_name(elf, sechdr);
 
 	if (sechdr->sh_type == SHT_PROGBITS &&
@@ -878,6 +879,7 @@ static void check_section(const char *modname, struct elf_info *elf,
 		     "section definitions for use in .S files.\n\n",
 		     modname, sec);
 	}
+#endif
 }
 
 
@@ -1963,10 +1965,12 @@ static void read_symbols(char *modname)
 	}
 
 	license = get_modinfo(info.modinfo, info.modinfo_len, "license");
+#if 0
 	if (!license && !is_vmlinux(modname))
 		warn("modpost: missing MODULE_LICENSE() in %s\n"
 		     "see include/linux/module.h for "
 		     "more information\n", modname);
+#endif
 	while (license) {
 		if (license_is_gpl_compatible(license))
 			mod->gpl_compatible = 1;
-- 
2.9.0


  parent reply	other threads:[~2018-02-02 16:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 16:15 [PATCH 0/7] LTO: hacks to build LTO-enabled randconfig kernels Arnd Bergmann
2018-02-02 16:15 ` [PATCH 1/7] [HACK] lto: make config.gz symbol visible Arnd Bergmann
2018-02-02 16:20 ` [PATCH 2/7] [HACK] x86: lto: always link in library files Arnd Bergmann
2018-02-02 16:21 ` [PATCH 3/7] [HACK] x86: crypto: fix link error with LTO Arnd Bergmann
2018-02-02 19:49   ` Nicolas Pitre
2018-02-02 22:18     ` Arnd Bergmann
2018-02-02 16:21 ` Arnd Bergmann [this message]
2018-02-02 16:21 ` [PATCH 5/7] [HACK] avoid gcc-8 ICE on LTO Arnd Bergmann
2018-02-02 17:04   ` Joe Perches
2018-02-02 16:21 ` [PATCH 6/7] Kbuild: lto: clean build artifacts Arnd Bergmann
2018-02-02 16:21 ` [PATCH 7/7] Kbuild: lto: pass -m32/-m64 to to LDFINAL Arnd Bergmann
2018-02-02 18:41   ` Nicolas Pitre
2018-02-02 20:18     ` Arnd Bergmann
2018-02-02 20:38       ` Nicolas Pitre
2018-02-02 20:55         ` Arnd Bergmann
2018-02-02 21:17           ` Nicolas Pitre

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=20180202162104.2300532-4-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ak@linux.intel.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.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