diff options
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/modpost.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 7acbdd8fcaed..1ec7158b6c1f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -790,6 +790,7 @@ static const char *section_white_list[] = | |||
| 790 | { | 790 | { |
| 791 | ".comment*", | 791 | ".comment*", |
| 792 | ".debug*", | 792 | ".debug*", |
| 793 | ".GCC-command-line", /* mn10300 */ | ||
| 793 | ".mdebug*", /* alpha, score, mips etc. */ | 794 | ".mdebug*", /* alpha, score, mips etc. */ |
| 794 | ".pdr", /* alpha, score, mips etc. */ | 795 | ".pdr", /* alpha, score, mips etc. */ |
| 795 | ".stab*", | 796 | ".stab*", |
| @@ -1034,6 +1035,13 @@ static const struct sectioncheck *section_mismatch( | |||
| 1034 | * fromsec = .data* | 1035 | * fromsec = .data* |
| 1035 | * atsym =__param* | 1036 | * atsym =__param* |
| 1036 | * | 1037 | * |
| 1038 | * Pattern 1a: | ||
| 1039 | * module_param_call() ops can refer to __init set function if permissions=0 | ||
| 1040 | * The pattern is identified by: | ||
| 1041 | * tosec = .init.text | ||
| 1042 | * fromsec = .data* | ||
| 1043 | * atsym = __param_ops_* | ||
| 1044 | * | ||
| 1037 | * Pattern 2: | 1045 | * Pattern 2: |
| 1038 | * Many drivers utilise a *driver container with references to | 1046 | * Many drivers utilise a *driver container with references to |
| 1039 | * add, remove, probe functions etc. | 1047 | * add, remove, probe functions etc. |
| @@ -1068,6 +1076,12 @@ static int secref_whitelist(const struct sectioncheck *mismatch, | |||
| 1068 | (strncmp(fromsym, "__param", strlen("__param")) == 0)) | 1076 | (strncmp(fromsym, "__param", strlen("__param")) == 0)) |
| 1069 | return 0; | 1077 | return 0; |
| 1070 | 1078 | ||
| 1079 | /* Check for pattern 1a */ | ||
| 1080 | if (strcmp(tosec, ".init.text") == 0 && | ||
| 1081 | match(fromsec, data_sections) && | ||
| 1082 | (strncmp(fromsym, "__param_ops_", strlen("__param_ops_")) == 0)) | ||
| 1083 | return 0; | ||
| 1084 | |||
| 1071 | /* Check for pattern 2 */ | 1085 | /* Check for pattern 2 */ |
| 1072 | if (match(tosec, init_exit_sections) && | 1086 | if (match(tosec, init_exit_sections) && |
| 1073 | match(fromsec, data_sections) && | 1087 | match(fromsec, data_sections) && |
