diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-08-01 12:39:01 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-08-04 14:32:13 +0300 |
commit | 1560cb0e186e83f0572a84d22e139c100060905c (patch) | |
tree | 7bf78b39310e6cc76c79def352e9f8c774178d61 /scripts/mod | |
parent | 7452dd26a59a9dfcde3f179594f3be6c4752a9a9 (diff) | |
download | linux-1560cb0e186e83f0572a84d22e139c100060905c.tar.xz |
modpost: remove unneeded .symbol_white_list initializers
The ->symbol_white_list field is referenced in secref_whitelist(),
only when 'fromsec' is data_sections.
/* Check for pattern 2 */
if (match(tosec, init_exit_sections) &&
match(fromsec, data_sections) &&
match(fromsym, mismatch->symbol_white_list))
return 0;
If .fromsec is not data sections, the .symbol_white_list member is
not used by anyone.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/modpost.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index c2949a1a0d5e..bcd1319f3097 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -930,7 +930,6 @@ static const struct sectioncheck sectioncheck[] = { .fromsec = { TEXT_SECTIONS, NULL }, .bad_tosec = { ALL_INIT_SECTIONS, NULL }, .mismatch = TEXT_TO_ANY_INIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, { .fromsec = { DATA_SECTIONS, NULL }, @@ -951,7 +950,6 @@ static const struct sectioncheck sectioncheck[] = { .fromsec = { TEXT_SECTIONS, NULL }, .bad_tosec = { ALL_EXIT_SECTIONS, NULL }, .mismatch = TEXT_TO_ANY_EXIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, { .fromsec = { DATA_SECTIONS, NULL }, @@ -964,41 +962,35 @@ static const struct sectioncheck sectioncheck[] = { .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, .bad_tosec = { INIT_SECTIONS, NULL }, .mismatch = XXXINIT_TO_SOME_INIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, /* Do not reference exit code/data from memexit code/data */ { .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, .bad_tosec = { EXIT_SECTIONS, NULL }, .mismatch = XXXEXIT_TO_SOME_EXIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, /* Do not use exit code/data from init code */ { .fromsec = { ALL_INIT_SECTIONS, NULL }, .bad_tosec = { ALL_EXIT_SECTIONS, NULL }, .mismatch = ANY_INIT_TO_ANY_EXIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, /* Do not use init code/data from exit code */ { .fromsec = { ALL_EXIT_SECTIONS, NULL }, .bad_tosec = { ALL_INIT_SECTIONS, NULL }, .mismatch = ANY_EXIT_TO_ANY_INIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, { .fromsec = { ALL_PCI_INIT_SECTIONS, NULL }, .bad_tosec = { INIT_SECTIONS, NULL }, .mismatch = ANY_INIT_TO_ANY_EXIT, - .symbol_white_list = { NULL }, }, /* Do not export init/exit functions or data */ { .fromsec = { "___ksymtab*", NULL }, .bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, .mismatch = EXPORT_TO_INIT_EXIT, - .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, }, { .fromsec = { "__ex_table", NULL }, |