Commit fd1db0a3 authored by Andi Kleen's avatar Andi Kleen Committed by Sam Ravnborg

kbuild: disable modpost warnings for linkonce sections

Disable modpost warnings for linkonce sections

My build gives lots of warnings like

WARNING: sound/core/snd.o (.gnu.linkonce.wi.mpspec_def.h.30779716): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

But for .linkonce. duplicated sections are actually ok and expected.
So just disable the warning for this case.
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent a95bcfac
...@@ -721,7 +721,7 @@ static int check_section(const char *modname, const char *sec) ...@@ -721,7 +721,7 @@ static int check_section(const char *modname, const char *sec)
/* consume all digits */ /* consume all digits */
while (*e && e != sec && isdigit(*e)) while (*e && e != sec && isdigit(*e))
e--; e--;
if (*e == '.') { if (*e == '.' && !strstr(sec, ".linkonce")) {
warn("%s (%s): unexpected section name.\n" warn("%s (%s): unexpected section name.\n"
"The (.[number]+) following section name are " "The (.[number]+) following section name are "
"ld generated and not expected.\n" "ld generated and not expected.\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment