瀏覽代碼

kbuild: ignore section mismatch warnings originating from .note section

.note* sections are ELF notes, which are typically used by external
tools to examine the kernel image.  Since this is removed from any
runtime consideration, it's OK to reference any section from a .note*
section.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Sam Ravnborg 18 年之前
父節點
當前提交
b28242e7e3
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scripts/mod/modpost.c

+ 2 - 0
scripts/mod/modpost.c

@@ -1152,6 +1152,7 @@ static int init_section_ref_ok(const char *name)
 		".debug",
 		".debug",
 		".parainstructions",
 		".parainstructions",
 		".rodata",
 		".rodata",
+		".note",		/* ignore ELF notes - may contain anything */
 		NULL
 		NULL
 	};
 	};
 	/* part of section name */
 	/* part of section name */
@@ -1228,6 +1229,7 @@ static int exit_section_ref_ok(const char *name)
 	/* Start of section names */
 	/* Start of section names */
 	const char *namelist2[] = {
 	const char *namelist2[] = {
 		".debug",
 		".debug",
+		".note",		/* ignore ELF notes - may contain anything */
 		NULL
 		NULL
 	};
 	};
 	/* part of section name */
 	/* part of section name */