diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-01-30 10:35:47 -0500 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-01-30 10:54:30 -0500 |
commit | bbd3f4fb84f8c4a04f22c9c6dc119b0c4856c7d9 (patch) | |
tree | f11db12190df7860b85828d91629364b575c1b04 /scripts | |
parent | 4a31a229fb6cbbeabf5ca9a0dcb55d53ca052048 (diff) |
modpost: give most mismatch constants a better name
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index dbab53a2e225..598d54a0fefb 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -836,14 +836,14 @@ static const char *linker_symbols[] = | |||
836 | 836 | ||
837 | enum mismatch { | 837 | enum mismatch { |
838 | NO_MISMATCH, | 838 | NO_MISMATCH, |
839 | TEXT_TO_INIT, | 839 | TEXT_TO_ANY_INIT, |
840 | DATA_TO_INIT, | 840 | DATA_TO_ANY_INIT, |
841 | TEXT_TO_EXIT, | 841 | TEXT_TO_ANY_EXIT, |
842 | DATA_TO_EXIT, | 842 | DATA_TO_ANY_EXIT, |
843 | XXXINIT_TO_INIT, | 843 | XXXINIT_TO_SOME_INIT, |
844 | XXXEXIT_TO_EXIT, | 844 | XXXEXIT_TO_SOME_EXIT, |
845 | INIT_TO_EXIT, | 845 | ANY_INIT_TO_ANY_EXIT, |
846 | EXIT_TO_INIT, | 846 | ANY_EXIT_TO_ANY_INIT, |
847 | EXPORT_TO_INIT_EXIT, | 847 | EXPORT_TO_INIT_EXIT, |
848 | }; | 848 | }; |
849 | 849 | ||
@@ -860,70 +860,70 @@ const struct sectioncheck sectioncheck[] = { | |||
860 | { | 860 | { |
861 | .fromsec = { TEXT_SECTIONS, NULL }, | 861 | .fromsec = { TEXT_SECTIONS, NULL }, |
862 | .tosec = { ALL_INIT_SECTIONS, NULL }, | 862 | .tosec = { ALL_INIT_SECTIONS, NULL }, |
863 | .mismatch = TEXT_TO_INIT, | 863 | .mismatch = TEXT_TO_ANY_INIT, |
864 | }, | 864 | }, |
865 | { | 865 | { |
866 | .fromsec = { DATA_SECTIONS, NULL }, | 866 | .fromsec = { DATA_SECTIONS, NULL }, |
867 | .tosec = { ALL_INIT_SECTIONS, NULL }, | 867 | .tosec = { ALL_INIT_SECTIONS, NULL }, |
868 | .mismatch = DATA_TO_INIT, | 868 | .mismatch = DATA_TO_ANY_INIT, |
869 | }, | 869 | }, |
870 | { | 870 | { |
871 | .fromsec = { TEXT_SECTIONS, NULL }, | 871 | .fromsec = { TEXT_SECTIONS, NULL }, |
872 | .tosec = { ALL_EXIT_SECTIONS, NULL }, | 872 | .tosec = { ALL_EXIT_SECTIONS, NULL }, |
873 | .mismatch = TEXT_TO_EXIT, | 873 | .mismatch = TEXT_TO_ANY_EXIT, |
874 | }, | 874 | }, |
875 | { | 875 | { |
876 | .fromsec = { DATA_SECTIONS, NULL }, | 876 | .fromsec = { DATA_SECTIONS, NULL }, |
877 | .tosec = { ALL_EXIT_SECTIONS, NULL }, | 877 | .tosec = { ALL_EXIT_SECTIONS, NULL }, |
878 | .mismatch = DATA_TO_EXIT, | 878 | .mismatch = DATA_TO_ANY_EXIT, |
879 | }, | 879 | }, |
880 | /* Do not reference init code/data from devinit/cpuinit/meminit code/data */ | 880 | /* Do not reference init code/data from devinit/cpuinit/meminit code/data */ |
881 | { | 881 | { |
882 | .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, | 882 | .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, |
883 | .tosec = { INIT_SECTIONS, NULL }, | 883 | .tosec = { INIT_SECTIONS, NULL }, |
884 | .mismatch = XXXINIT_TO_INIT, | 884 | .mismatch = XXXINIT_TO_SOME_INIT, |
885 | }, | 885 | }, |
886 | /* Do not reference cpuinit code/data from meminit code/data */ | 886 | /* Do not reference cpuinit code/data from meminit code/data */ |
887 | { | 887 | { |
888 | .fromsec = { MEM_INIT_SECTIONS, NULL }, | 888 | .fromsec = { MEM_INIT_SECTIONS, NULL }, |
889 | .tosec = { CPU_INIT_SECTIONS, NULL }, | 889 | .tosec = { CPU_INIT_SECTIONS, NULL }, |
890 | .mismatch = XXXINIT_TO_INIT, | 890 | .mismatch = XXXINIT_TO_SOME_INIT, |
891 | }, | 891 | }, |
892 | /* Do not reference meminit code/data from cpuinit code/data */ | 892 | /* Do not reference meminit code/data from cpuinit code/data */ |
893 | { | 893 | { |
894 | .fromsec = { CPU_INIT_SECTIONS, NULL }, | 894 | .fromsec = { CPU_INIT_SECTIONS, NULL }, |
895 | .tosec = { MEM_INIT_SECTIONS, NULL }, | 895 | .tosec = { MEM_INIT_SECTIONS, NULL }, |
896 | .mismatch = XXXINIT_TO_INIT, | 896 | .mismatch = XXXINIT_TO_SOME_INIT, |
897 | }, | 897 | }, |
898 | /* Do not reference exit code/data from devexit/cpuexit/memexit code/data */ | 898 | /* Do not reference exit code/data from devexit/cpuexit/memexit code/data */ |
899 | { | 899 | { |
900 | .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, | 900 | .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, |
901 | .tosec = { EXIT_SECTIONS, NULL }, | 901 | .tosec = { EXIT_SECTIONS, NULL }, |
902 | .mismatch = XXXEXIT_TO_EXIT, | 902 | .mismatch = XXXEXIT_TO_SOME_EXIT, |
903 | }, | 903 | }, |
904 | /* Do not reference cpuexit code/data from memexit code/data */ | 904 | /* Do not reference cpuexit code/data from memexit code/data */ |
905 | { | 905 | { |
906 | .fromsec = { MEM_EXIT_SECTIONS, NULL }, | 906 | .fromsec = { MEM_EXIT_SECTIONS, NULL }, |
907 | .tosec = { CPU_EXIT_SECTIONS, NULL }, | 907 | .tosec = { CPU_EXIT_SECTIONS, NULL }, |
908 | .mismatch = XXXEXIT_TO_EXIT, | 908 | .mismatch = XXXEXIT_TO_SOME_EXIT, |
909 | }, | 909 | }, |
910 | /* Do not reference memexit code/data from cpuexit code/data */ | 910 | /* Do not reference memexit code/data from cpuexit code/data */ |
911 | { | 911 | { |
912 | .fromsec = { CPU_EXIT_SECTIONS, NULL }, | 912 | .fromsec = { CPU_EXIT_SECTIONS, NULL }, |
913 | .tosec = { MEM_EXIT_SECTIONS, NULL }, | 913 | .tosec = { MEM_EXIT_SECTIONS, NULL }, |
914 | .mismatch = XXXEXIT_TO_EXIT, | 914 | .mismatch = XXXEXIT_TO_SOME_EXIT, |
915 | }, | 915 | }, |
916 | /* Do not use exit code/data from init code */ | 916 | /* Do not use exit code/data from init code */ |
917 | { | 917 | { |
918 | .fromsec = { ALL_INIT_SECTIONS, NULL }, | 918 | .fromsec = { ALL_INIT_SECTIONS, NULL }, |
919 | .tosec = { ALL_EXIT_SECTIONS, NULL }, | 919 | .tosec = { ALL_EXIT_SECTIONS, NULL }, |
920 | .mismatch = INIT_TO_EXIT, | 920 | .mismatch = ANY_INIT_TO_ANY_EXIT, |
921 | }, | 921 | }, |
922 | /* Do not use init code/data from exit code */ | 922 | /* Do not use init code/data from exit code */ |
923 | { | 923 | { |
924 | .fromsec = { ALL_EXIT_SECTIONS, NULL }, | 924 | .fromsec = { ALL_EXIT_SECTIONS, NULL }, |
925 | .tosec = { ALL_INIT_SECTIONS, NULL }, | 925 | .tosec = { ALL_INIT_SECTIONS, NULL }, |
926 | .mismatch = EXIT_TO_INIT, | 926 | .mismatch = ANY_EXIT_TO_ANY_INIT, |
927 | }, | 927 | }, |
928 | /* Do not export init/exit functions or data */ | 928 | /* Do not export init/exit functions or data */ |
929 | { | 929 | { |
@@ -1190,7 +1190,7 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1190 | tosym, to_p); | 1190 | tosym, to_p); |
1191 | 1191 | ||
1192 | switch (mismatch) { | 1192 | switch (mismatch) { |
1193 | case TEXT_TO_INIT: | 1193 | case TEXT_TO_ANY_INIT: |
1194 | fprintf(stderr, | 1194 | fprintf(stderr, |
1195 | "The function %s%s() references\n" | 1195 | "The function %s%s() references\n" |
1196 | "the %s %s%s%s.\n" | 1196 | "the %s %s%s%s.\n" |
@@ -1200,7 +1200,7 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1200 | to, sec2annotation(tosec), tosym, to_p, | 1200 | to, sec2annotation(tosec), tosym, to_p, |
1201 | fromsym, sec2annotation(tosec), tosym); | 1201 | fromsym, sec2annotation(tosec), tosym); |
1202 | break; | 1202 | break; |
1203 | case DATA_TO_INIT: { | 1203 | case DATA_TO_ANY_INIT: { |
1204 | const char **s = symbol_white_list; | 1204 | const char **s = symbol_white_list; |
1205 | fprintf(stderr, | 1205 | fprintf(stderr, |
1206 | "The variable %s references\n" | 1206 | "The variable %s references\n" |
@@ -1214,14 +1214,14 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1214 | fprintf(stderr, "\n"); | 1214 | fprintf(stderr, "\n"); |
1215 | break; | 1215 | break; |
1216 | } | 1216 | } |
1217 | case TEXT_TO_EXIT: | 1217 | case TEXT_TO_ANY_EXIT: |
1218 | fprintf(stderr, | 1218 | fprintf(stderr, |
1219 | "The function %s() references a %s in an exit section.\n" | 1219 | "The function %s() references a %s in an exit section.\n" |
1220 | "Often the %s %s%s has valid usage outside the exit section\n" | 1220 | "Often the %s %s%s has valid usage outside the exit section\n" |
1221 | "and the fix is to remove the %sannotation of %s.\n", | 1221 | "and the fix is to remove the %sannotation of %s.\n", |
1222 | fromsym, to, to, tosym, to_p, sec2annotation(tosec), tosym); | 1222 | fromsym, to, to, tosym, to_p, sec2annotation(tosec), tosym); |
1223 | break; | 1223 | break; |
1224 | case DATA_TO_EXIT: { | 1224 | case DATA_TO_ANY_EXIT: { |
1225 | const char **s = symbol_white_list; | 1225 | const char **s = symbol_white_list; |
1226 | fprintf(stderr, | 1226 | fprintf(stderr, |
1227 | "The variable %s references\n" | 1227 | "The variable %s references\n" |
@@ -1235,8 +1235,8 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1235 | fprintf(stderr, "\n"); | 1235 | fprintf(stderr, "\n"); |
1236 | break; | 1236 | break; |
1237 | } | 1237 | } |
1238 | case XXXINIT_TO_INIT: | 1238 | case XXXINIT_TO_SOME_INIT: |
1239 | case XXXEXIT_TO_EXIT: | 1239 | case XXXEXIT_TO_SOME_EXIT: |
1240 | fprintf(stderr, | 1240 | fprintf(stderr, |
1241 | "The %s %s%s%s references\n" | 1241 | "The %s %s%s%s references\n" |
1242 | "a %s %s%s%s.\n" | 1242 | "a %s %s%s%s.\n" |
@@ -1246,7 +1246,7 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1246 | to, sec2annotation(tosec), tosym, to_p, | 1246 | to, sec2annotation(tosec), tosym, to_p, |
1247 | tosym, fromsym, tosym); | 1247 | tosym, fromsym, tosym); |
1248 | break; | 1248 | break; |
1249 | case INIT_TO_EXIT: | 1249 | case ANY_INIT_TO_ANY_EXIT: |
1250 | fprintf(stderr, | 1250 | fprintf(stderr, |
1251 | "The %s %s%s%s references\n" | 1251 | "The %s %s%s%s references\n" |
1252 | "a %s %s%s%s.\n" | 1252 | "a %s %s%s%s.\n" |
@@ -1259,7 +1259,7 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, | |||
1259 | to, sec2annotation(tosec), tosym, to_p, | 1259 | to, sec2annotation(tosec), tosym, to_p, |
1260 | sec2annotation(tosec), tosym, to_p); | 1260 | sec2annotation(tosec), tosym, to_p); |
1261 | break; | 1261 | break; |
1262 | case EXIT_TO_INIT: | 1262 | case ANY_EXIT_TO_ANY_INIT: |
1263 | fprintf(stderr, | 1263 | fprintf(stderr, |
1264 | "The %s %s%s%s references\n" | 1264 | "The %s %s%s%s references\n" |
1265 | "a %s %s%s%s.\n" | 1265 | "a %s %s%s%s.\n" |