Commit a3df1526 authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: disallow the combination of EXPORT_SYMBOL and __meminit*

Theoretically, we could export conditionally-discarded code sections,
such as .meminit*, if all the users can become modular under a certain
condition. However, that would be difficult to control and such a tricky
case has never occurred.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 48cd8df7
......@@ -1164,7 +1164,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,
ELF_ST_TYPE(sym->st_info) == STT_LOPROC)
s->is_func = true;
if (match(secname, PATTERNS(INIT_SECTIONS)))
if (match(secname, PATTERNS(ALL_INIT_SECTIONS)))
warn("%s: %s: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.\n",
mod->name, name);
else if (match(secname, PATTERNS(ALL_EXIT_SECTIONS)))
......
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