diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 7ec4480e9ca8..f4b9fdd67381 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -945,7 +945,6 @@ static const char *const head_sections[] = { ".head.text*", NULL }; static const char *const linker_symbols[] = { "__init_begin", "_sinittext", "_einittext", NULL }; static const char *const optim_symbols[] = { "*.constprop.*", NULL }; -static const char *const cfi_symbols[] = { "*.cfi", NULL }; enum mismatch { TEXT_TO_ANY_INIT, @@ -1176,16 +1175,6 @@ static const struct sectioncheck *section_mismatch( * names to work. (One situation where gcc can autogenerate ELF * local symbols is when "-fsection-anchors" is used.) * - * Pattern 7: - * With CONFIG_CFI_CLANG, clang appends .cfi to all indirectly called - * functions and creates a function stub with the original name. This - * stub is always placed in .text, even if the actual function with the - * .cfi postfix is in .init.text or .exit.text. - * This pattern is identified by - * tosec = init or exit section - * fromsec = text section - * tosym = *.cfi - * **/ static int secref_whitelist(const struct sectioncheck *mismatch, const char *fromsec, const char *fromsym, @@ -1228,12 +1217,6 @@ static int secref_whitelist(const struct sectioncheck *mismatch, if (strstarts(fromsym, ".L")) return 0; - /* Check for pattern 7 */ - if (match(fromsec, text_sections) && - match(tosec, init_exit_sections) && - match(tosym, cfi_symbols)) - return 0; - return 1; }