History

modpost: merge sectioncheck table entries regarding init/exit sections

Check symbol references from normal sections to init/exit sections in a single entry.

Masahiro Yamada committed 3 years ago

Commit b3d4f441 parent e578e4e1 file · +3 −15Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/mod/modpost.c+3−15
@@ -823,9 +823,7 @@ static void check_section(const char *modname, struct elf_info *elf, · 822 unmodified lines
823 TEXT_SECTIONS, OTHER_TEXT_SECTIONS823 TEXT_SECTIONS, OTHER_TEXT_SECTIONS
824 824
825enum mismatch {825enum mismatch {
826 TEXT_TO_ANY_INIT,826 TEXTDATA_TO_ANY_INIT_EXIT,
827 DATA_TO_ANY_INIT,
828 TEXTDATA_TO_ANY_EXIT,
829 XXXINIT_TO_SOME_INIT,827 XXXINIT_TO_SOME_INIT,
830 ANY_INIT_TO_ANY_EXIT,828 ANY_INIT_TO_ANY_EXIT,
831 ANY_EXIT_TO_ANY_INIT,829 ANY_EXIT_TO_ANY_INIT,
@@ -856,20 +854,10 @@ static const struct sectioncheck sectioncheck[] = { · 24 unmodified lines
856/* Do not reference init/exit code/data from854/* Do not reference init/exit code/data from
857 * normal code and data855 * normal code and data
858 */856 */
859{
860 .fromsec = { TEXT_SECTIONS, NULL },
861 .bad_tosec = { ALL_INIT_SECTIONS, NULL },
862 .mismatch = TEXT_TO_ANY_INIT,
863},
864{
865 .fromsec = { DATA_SECTIONS, NULL },
866 .bad_tosec = { ALL_INIT_SECTIONS, NULL },
867 .mismatch = DATA_TO_ANY_INIT,
868},
869{857{
870 .fromsec = { TEXT_SECTIONS, DATA_SECTIONS, NULL },858 .fromsec = { TEXT_SECTIONS, DATA_SECTIONS, NULL },
871 .bad_tosec = { ALL_EXIT_SECTIONS, NULL },859 .bad_tosec = { ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL },
872 .mismatch = TEXTDATA_TO_ANY_EXIT,860 .mismatch = TEXTDATA_TO_ANY_INIT_EXIT,
873},861},
874/* Do not reference init code/data from meminit code/data */862/* Do not reference init code/data from meminit code/data */
875{863{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t