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
823823 TEXT_SECTIONS, OTHER_TEXT_SECTIONS
824824
825825 enum mismatch {
826− TEXT_TO_ANY_INIT,
827− DATA_TO_ANY_INIT,
828− TEXTDATA_TO_ANY_EXIT,
826+ TEXTDATA_TO_ANY_INIT_EXIT,
829827 XXXINIT_TO_SOME_INIT,
830828 ANY_INIT_TO_ANY_EXIT,
831829 ANY_EXIT_TO_ANY_INIT,
@@ -856,20 +854,10 @@ static const struct sectioncheck sectioncheck[] = { · 24 unmodified lines
856854 /* Do not reference init/exit code/data from
857855 * normal code and data
858856 */
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−},
869857 {
870858 .fromsec = { TEXT_SECTIONS, DATA_SECTIONS, NULL },
871− .bad_tosec = { ALL_EXIT_SECTIONS, NULL },
872− .mismatch = TEXTDATA_TO_ANY_EXIT,
859+ .bad_tosec = { ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL },
860+ .mismatch = TEXTDATA_TO_ANY_INIT_EXIT,
873861 },
874862 /* Do not reference init code/data from meminit code/data */
875863 {

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