提交 ef178f92 编写于 作者: A Andi Kleen 提交者: H. Peter Anvin

Kbuild, lto: Handle basic LTO in modpost

- Don't warn about LTO marker symbols. modpost runs before
the linker, so the module is not necessarily LTOed yet.
- Don't complain about .gnu.lto* sections
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1391846481-31491-13-git-send-email-ak@linux.intel.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
上级 1e64ff42
......@@ -623,6 +623,9 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
switch (sym->st_shndx) {
case SHN_COMMON:
if (!strncmp(symname, "__gnu_lto_", sizeof("__gnu_lto_")-1)) {
/* Should warn here, but modpost runs before the linker */
} else
warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name);
break;
case SHN_UNDEF:
......@@ -849,6 +852,7 @@ static const char *section_white_list[] =
".xt.lit", /* xtensa */
".arcextmap*", /* arc */
".gnu.linkonce.arcext*", /* arc : modules */
".gnu.lto*",
NULL
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册