@@ -808,7 +808,7 @@ static void check_section(const char *modname, struct elf_info *elf,
808
808
#define ALL_XXXINIT_SECTIONS ".meminit.*"
809
809
810
810
#define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
811
- #define ALL_EXIT_SECTIONS EXIT_SECTIONS
811
+ #define ALL_EXIT_SECTIONS ".exit.*"
812
812
813
813
#define DATA_SECTIONS ".data", ".data.rel"
814
814
#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
@@ -819,8 +819,6 @@ static void check_section(const char *modname, struct elf_info *elf,
819
819
820
820
#define INIT_SECTIONS ".init.*"
821
821
822
- #define EXIT_SECTIONS ".exit.*"
823
-
824
822
#define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \
825
823
TEXT_SECTIONS, OTHER_TEXT_SECTIONS
826
824
@@ -1006,7 +1004,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
1006
1004
*/
1007
1005
if (!extra_warn &&
1008
1006
match (fromsec , PATTERNS (DATA_SECTIONS )) &&
1009
- match (tosec , PATTERNS (EXIT_SECTIONS )) &&
1007
+ match (tosec , PATTERNS (ALL_EXIT_SECTIONS )) &&
1010
1008
match (fromsym , PATTERNS ("*driver" )))
1011
1009
return 0 ;
1012
1010
@@ -1169,7 +1167,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,
1169
1167
if (match (secname , PATTERNS (INIT_SECTIONS )))
1170
1168
warn ("%s: %s: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.\n" ,
1171
1169
mod -> name , name );
1172
- else if (match (secname , PATTERNS (EXIT_SECTIONS )))
1170
+ else if (match (secname , PATTERNS (ALL_EXIT_SECTIONS )))
1173
1171
warn ("%s: %s: EXPORT_SYMBOL used for exit symbol. Remove __exit or EXPORT_SYMBOL.\n" ,
1174
1172
mod -> name , name );
1175
1173
}
0 commit comments