@@ -808,7 +808,7 @@ static void check_section(const char *modname, struct elf_info *elf,
808808#define ALL_XXXINIT_SECTIONS ".meminit.*"
809809
810810#define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
811- #define ALL_EXIT_SECTIONS EXIT_SECTIONS
811+ #define ALL_EXIT_SECTIONS ".exit.*"
812812
813813#define DATA_SECTIONS ".data", ".data.rel"
814814#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
@@ -819,8 +819,6 @@ static void check_section(const char *modname, struct elf_info *elf,
819819
820820#define INIT_SECTIONS ".init.*"
821821
822- #define EXIT_SECTIONS ".exit.*"
823-
824822#define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \
825823 TEXT_SECTIONS, OTHER_TEXT_SECTIONS
826824
@@ -1006,7 +1004,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
10061004 */
10071005 if (!extra_warn &&
10081006 match (fromsec , PATTERNS (DATA_SECTIONS )) &&
1009- match (tosec , PATTERNS (EXIT_SECTIONS )) &&
1007+ match (tosec , PATTERNS (ALL_EXIT_SECTIONS )) &&
10101008 match (fromsym , PATTERNS ("*driver" )))
10111009 return 0 ;
10121010
@@ -1169,7 +1167,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,
11691167 if (match (secname , PATTERNS (INIT_SECTIONS )))
11701168 warn ("%s: %s: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.\n" ,
11711169 mod -> name , name );
1172- else if (match (secname , PATTERNS (EXIT_SECTIONS )))
1170+ else if (match (secname , PATTERNS (ALL_EXIT_SECTIONS )))
11731171 warn ("%s: %s: EXPORT_SYMBOL used for exit symbol. Remove __exit or EXPORT_SYMBOL.\n" ,
11741172 mod -> name , name );
11751173}
0 commit comments