diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-21 18:55:26 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-21 18:55:26 -0400 |
| commit | eddecbb601c9ea3fab7e67d7892010fc9426d1e6 (patch) | |
| tree | 4bfa4740ae554e5c5a8468e74b39531a6153ce9f /scripts/mod | |
| parent | 0bf8c869701039b12c3520cb1bb1689595ab108b (diff) | |
| parent | f2c23f65f63fe0dd83fc94efdfae0364c74458b8 (diff) | |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default
genksyms: Regenerate lexer and parser
genksyms: Track changes to enum constants
genksyms: simplify usage of find_symbol()
genksyms: Add helpers for building string lists
genksyms: Simplify printing of symbol types
genksyms: Simplify lexer
genksyms: Do not paste the bison header file to lex.c
modpost: fix trailing comma
KBuild: silence "'scripts/unifdef' is up to date."
kbuild: Add extra gcc checks
kbuild: reenable section mismatch analysis
unifdef: update to upstream version 2.5
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/modpost.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index e8fba959fffb..cd104afcc5f2 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -1248,6 +1248,19 @@ static int is_function(Elf_Sym *sym) | |||
| 1248 | return -1; | 1248 | return -1; |
| 1249 | } | 1249 | } |
| 1250 | 1250 | ||
| 1251 | static void print_section_list(const char * const list[20]) | ||
| 1252 | { | ||
| 1253 | const char *const *s = list; | ||
| 1254 | |||
| 1255 | while (*s) { | ||
| 1256 | fprintf(stderr, "%s", *s); | ||
| 1257 | s++; | ||
| 1258 | if (*s) | ||
| 1259 | fprintf(stderr, ", "); | ||
| 1260 | } | ||
| 1261 | fprintf(stderr, "\n"); | ||
| 1262 | } | ||
| 1263 | |||
| 1251 | /* | 1264 | /* |
| 1252 | * Print a warning about a section mismatch. | 1265 | * Print a warning about a section mismatch. |
| 1253 | * Try to find symbols near it so user can find it. | 1266 | * Try to find symbols near it so user can find it. |
| @@ -1304,7 +1317,6 @@ static void report_sec_mismatch(const char *modname, | |||
| 1304 | break; | 1317 | break; |
| 1305 | case DATA_TO_ANY_INIT: { | 1318 | case DATA_TO_ANY_INIT: { |
| 1306 | prl_to = sec2annotation(tosec); | 1319 | prl_to = sec2annotation(tosec); |
| 1307 | const char *const *s = mismatch->symbol_white_list; | ||
| 1308 | fprintf(stderr, | 1320 | fprintf(stderr, |
| 1309 | "The variable %s references\n" | 1321 | "The variable %s references\n" |
| 1310 | "the %s %s%s%s\n" | 1322 | "the %s %s%s%s\n" |
| @@ -1312,9 +1324,7 @@ static void report_sec_mismatch(const char *modname, | |||
| 1312 | "variable with __init* or __refdata (see linux/init.h) " | 1324 | "variable with __init* or __refdata (see linux/init.h) " |
| 1313 | "or name the variable:\n", | 1325 | "or name the variable:\n", |
| 1314 | fromsym, to, prl_to, tosym, to_p); | 1326 | fromsym, to, prl_to, tosym, to_p); |
| 1315 | while (*s) | 1327 | print_section_list(mismatch->symbol_white_list); |
| 1316 | fprintf(stderr, "%s, ", *s++); | ||
| 1317 | fprintf(stderr, "\n"); | ||
| 1318 | free(prl_to); | 1328 | free(prl_to); |
| 1319 | break; | 1329 | break; |
| 1320 | } | 1330 | } |
| @@ -1329,7 +1339,6 @@ static void report_sec_mismatch(const char *modname, | |||
| 1329 | break; | 1339 | break; |
| 1330 | case DATA_TO_ANY_EXIT: { | 1340 | case DATA_TO_ANY_EXIT: { |
| 1331 | prl_to = sec2annotation(tosec); | 1341 | prl_to = sec2annotation(tosec); |
| 1332 | const char *const *s = mismatch->symbol_white_list; | ||
| 1333 | fprintf(stderr, | 1342 | fprintf(stderr, |
| 1334 | "The variable %s references\n" | 1343 | "The variable %s references\n" |
| 1335 | "the %s %s%s%s\n" | 1344 | "the %s %s%s%s\n" |
| @@ -1337,9 +1346,7 @@ static void report_sec_mismatch(const char *modname, | |||
| 1337 | "variable with __exit* (see linux/init.h) or " | 1346 | "variable with __exit* (see linux/init.h) or " |
| 1338 | "name the variable:\n", | 1347 | "name the variable:\n", |
| 1339 | fromsym, to, prl_to, tosym, to_p); | 1348 | fromsym, to, prl_to, tosym, to_p); |
| 1340 | while (*s) | 1349 | print_section_list(mismatch->symbol_white_list); |
| 1341 | fprintf(stderr, "%s, ", *s++); | ||
| 1342 | fprintf(stderr, "\n"); | ||
| 1343 | free(prl_to); | 1350 | free(prl_to); |
| 1344 | break; | 1351 | break; |
| 1345 | } | 1352 | } |
