diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-05-18 17:06:31 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-05-18 17:06:49 +0200 |
| commit | 6b7b8e488bbdedeccabdd001a78ffcbe43bb8a3a (patch) | |
| tree | f2f77cc31b4548745778fca6a51b09e1d8a49804 /scripts/mod/modpost.c | |
| parent | b50f315cbb865079a16a12fd9ae6083f98fd592c (diff) | |
| parent | c1d10d18c542278b7fbc413c289d3cb6219da6b3 (diff) | |
Merge branch 'master' into upstream.
This is sync with Linus' tree to receive KEY_IMAGES definition
that went in through input tree.
Diffstat (limited to 'scripts/mod/modpost.c')
| -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 e8fba959fff..cd104afcc5f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1248,6 +1248,19 @@ static int is_function(Elf_Sym *sym) return -1; } +static void print_section_list(const char * const list[20]) +{ + const char *const *s = list; + + while (*s) { + fprintf(stderr, "%s", *s); + s++; + if (*s) + fprintf(stderr, ", "); + } + fprintf(stderr, "\n"); +} + /* * Print a warning about a section mismatch. * Try to find symbols near it so user can find it. @@ -1304,7 +1317,6 @@ static void report_sec_mismatch(const char *modname, break; case DATA_TO_ANY_INIT: { prl_to = sec2annotation(tosec); - const char *const *s = mismatch->symbol_white_list; fprintf(stderr, "The variable %s references\n" "the %s %s%s%s\n" @@ -1312,9 +1324,7 @@ static void report_sec_mismatch(const char *modname, "variable with __init* or __refdata (see linux/init.h) " "or name the variable:\n", fromsym, to, prl_to, tosym, to_p); - while (*s) - fprintf(stderr, "%s, ", *s++); - fprintf(stderr, "\n"); + print_section_list(mismatch->symbol_white_list); free(prl_to); break; } @@ -1329,7 +1339,6 @@ static void report_sec_mismatch(const char *modname, break; case DATA_TO_ANY_EXIT: { prl_to = sec2annotation(tosec); - const char *const *s = mismatch->symbol_white_list; fprintf(stderr, "The variable %s references\n" "the %s %s%s%s\n" @@ -1337,9 +1346,7 @@ static void report_sec_mismatch(const char *modname, "variable with __exit* (see linux/init.h) or " "name the variable:\n", fromsym, to, prl_to, tosym, to_p); - while (*s) - fprintf(stderr, "%s, ", *s++); - fprintf(stderr, "\n"); + print_section_list(mismatch->symbol_white_list); free(prl_to); break; } |
