diff options
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/modpost.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index c64066dcd2e4..3aab410f020e 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -1163,6 +1163,14 @@ static const struct sectioncheck *section_mismatch( | |||
| 1163 | * fromsec = text section | 1163 | * fromsec = text section |
| 1164 | * refsymname = *.constprop.* | 1164 | * refsymname = *.constprop.* |
| 1165 | * | 1165 | * |
| 1166 | * Pattern 6: | ||
| 1167 | * Hide section mismatch warnings for ELF local symbols. The goal | ||
| 1168 | * is to eliminate false positive modpost warnings caused by | ||
| 1169 | * compiler-generated ELF local symbol names such as ".LANCHOR1". | ||
| 1170 | * Autogenerated symbol names bypass modpost's "Pattern 2" | ||
| 1171 | * whitelisting, which relies on pattern-matching against symbol | ||
| 1172 | * names to work. (One situation where gcc can autogenerate ELF | ||
| 1173 | * local symbols is when "-fsection-anchors" is used.) | ||
| 1166 | **/ | 1174 | **/ |
| 1167 | static int secref_whitelist(const struct sectioncheck *mismatch, | 1175 | static int secref_whitelist(const struct sectioncheck *mismatch, |
| 1168 | const char *fromsec, const char *fromsym, | 1176 | const char *fromsec, const char *fromsym, |
| @@ -1201,6 +1209,10 @@ static int secref_whitelist(const struct sectioncheck *mismatch, | |||
| 1201 | match(fromsym, optim_symbols)) | 1209 | match(fromsym, optim_symbols)) |
| 1202 | return 0; | 1210 | return 0; |
| 1203 | 1211 | ||
| 1212 | /* Check for pattern 6 */ | ||
| 1213 | if (strstarts(fromsym, ".L")) | ||
| 1214 | return 0; | ||
| 1215 | |||
| 1204 | return 1; | 1216 | return 1; |
| 1205 | } | 1217 | } |
| 1206 | 1218 | ||
