diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 6 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 38 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 4 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 7 | ||||
| -rw-r--r-- | scripts/mod/modpost.h | 1 | ||||
| -rw-r--r-- | scripts/xz_wrap.sh | 4 |
6 files changed, 14 insertions, 46 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index de639eeeed50..faea0ec612bf 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -1869,12 +1869,6 @@ sub process { | |||
| 1869 | "No space is necessary after a cast\n" . $hereprev); | 1869 | "No space is necessary after a cast\n" . $hereprev); |
| 1870 | } | 1870 | } |
| 1871 | 1871 | ||
| 1872 | if ($rawline =~ /^\+[ \t]*\/\*[ \t]*$/ && | ||
| 1873 | $prevrawline =~ /^\+[ \t]*$/) { | ||
| 1874 | CHK("BLOCK_COMMENT_STYLE", | ||
| 1875 | "Don't begin block comments with only a /* line, use /* comment...\n" . $hereprev); | ||
| 1876 | } | ||
| 1877 | |||
| 1878 | # check for spaces at the beginning of a line. | 1872 | # check for spaces at the beginning of a line. |
| 1879 | # Exceptions: | 1873 | # Exceptions: |
| 1880 | # 1) within comments | 1874 | # 1) within comments |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 0586085136d1..52577f052bc1 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -540,35 +540,6 @@ static struct conf_printer header_printer_cb = | |||
| 540 | }; | 540 | }; |
| 541 | 541 | ||
| 542 | /* | 542 | /* |
| 543 | * Generate the __enabled_CONFIG_* and __enabled_CONFIG_*_MODULE macros for | ||
| 544 | * use by the IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is | ||
| 545 | * generated even for booleans so that the IS_ENABLED() macro works. | ||
| 546 | */ | ||
| 547 | static void | ||
| 548 | header_print__enabled_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) | ||
| 549 | { | ||
| 550 | |||
| 551 | switch (sym->type) { | ||
| 552 | case S_BOOLEAN: | ||
| 553 | case S_TRISTATE: { | ||
| 554 | fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", | ||
| 555 | sym->name, (*value == 'y')); | ||
| 556 | fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", | ||
| 557 | sym->name, (*value == 'm')); | ||
| 558 | break; | ||
| 559 | } | ||
| 560 | default: | ||
| 561 | break; | ||
| 562 | } | ||
| 563 | } | ||
| 564 | |||
| 565 | static struct conf_printer header__enabled_printer_cb = | ||
| 566 | { | ||
| 567 | .print_symbol = header_print__enabled_symbol, | ||
| 568 | .print_comment = header_print_comment, | ||
| 569 | }; | ||
| 570 | |||
| 571 | /* | ||
| 572 | * Tristate printer | 543 | * Tristate printer |
| 573 | * | 544 | * |
| 574 | * This printer is used when generating the `include/config/tristate.conf' file. | 545 | * This printer is used when generating the `include/config/tristate.conf' file. |
| @@ -949,16 +920,11 @@ int conf_write_autoconf(void) | |||
| 949 | conf_write_heading(out_h, &header_printer_cb, NULL); | 920 | conf_write_heading(out_h, &header_printer_cb, NULL); |
| 950 | 921 | ||
| 951 | for_all_symbols(i, sym) { | 922 | for_all_symbols(i, sym) { |
| 952 | if (!sym->name) | ||
| 953 | continue; | ||
| 954 | |||
| 955 | sym_calc_value(sym); | 923 | sym_calc_value(sym); |
| 956 | 924 | if (!(sym->flags & SYMBOL_WRITE) || !sym->name) | |
| 957 | conf_write_symbol(out_h, sym, &header__enabled_printer_cb, NULL); | ||
| 958 | |||
| 959 | if (!(sym->flags & SYMBOL_WRITE)) | ||
| 960 | continue; | 925 | continue; |
| 961 | 926 | ||
| 927 | /* write symbol to auto.conf, tristate and header files */ | ||
| 962 | conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); | 928 | conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); |
| 963 | 929 | ||
| 964 | conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); | 930 | conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 8e730ccc3f2b..44ddaa542db6 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -1100,6 +1100,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
| 1100 | if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) | 1100 | if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) |
| 1101 | return; | 1101 | return; |
| 1102 | 1102 | ||
| 1103 | /* We're looking for an object */ | ||
| 1104 | if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) | ||
| 1105 | return; | ||
| 1106 | |||
| 1103 | /* All our symbols are of form <prefix>__mod_XXX_device_table. */ | 1107 | /* All our symbols are of form <prefix>__mod_XXX_device_table. */ |
| 1104 | name = strstr(symname, "__mod_"); | 1108 | name = strstr(symname, "__mod_"); |
| 1105 | if (!name) | 1109 | if (!name) |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 3f01fd908730..c4e7d1510f9d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -132,8 +132,10 @@ static struct module *new_module(char *modname) | |||
| 132 | /* strip trailing .o */ | 132 | /* strip trailing .o */ |
| 133 | s = strrchr(p, '.'); | 133 | s = strrchr(p, '.'); |
| 134 | if (s != NULL) | 134 | if (s != NULL) |
| 135 | if (strcmp(s, ".o") == 0) | 135 | if (strcmp(s, ".o") == 0) { |
| 136 | *s = '\0'; | 136 | *s = '\0'; |
| 137 | mod->is_dot_o = 1; | ||
| 138 | } | ||
| 137 | 139 | ||
| 138 | /* add to list */ | 140 | /* add to list */ |
| 139 | mod->name = p; | 141 | mod->name = p; |
| @@ -587,7 +589,8 @@ static void handle_modversions(struct module *mod, struct elf_info *info, | |||
| 587 | unsigned int crc; | 589 | unsigned int crc; |
| 588 | enum export export; | 590 | enum export export; |
| 589 | 591 | ||
| 590 | if (!is_vmlinux(mod->name) && strncmp(symname, "__ksymtab", 9) == 0) | 592 | if ((!is_vmlinux(mod->name) || mod->is_dot_o) && |
| 593 | strncmp(symname, "__ksymtab", 9) == 0) | ||
| 591 | export = export_from_secname(info, get_secindex(info, sym)); | 594 | export = export_from_secname(info, get_secindex(info, sym)); |
| 592 | else | 595 | else |
| 593 | export = export_from_sec(info, get_secindex(info, sym)); | 596 | export = export_from_sec(info, get_secindex(info, sym)); |
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 2031119080dc..51207e4d5f8b 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h | |||
| @@ -113,6 +113,7 @@ struct module { | |||
| 113 | int has_cleanup; | 113 | int has_cleanup; |
| 114 | struct buffer dev_table_buf; | 114 | struct buffer dev_table_buf; |
| 115 | char srcversion[25]; | 115 | char srcversion[25]; |
| 116 | int is_dot_o; | ||
| 116 | }; | 117 | }; |
| 117 | 118 | ||
| 118 | struct elf_info { | 119 | struct elf_info { |
diff --git a/scripts/xz_wrap.sh b/scripts/xz_wrap.sh index 17a5798c29da..7a2d372f4885 100644 --- a/scripts/xz_wrap.sh +++ b/scripts/xz_wrap.sh | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | BCJ= | 12 | BCJ= |
| 13 | LZMA2OPTS= | 13 | LZMA2OPTS= |
| 14 | 14 | ||
| 15 | case $ARCH in | 15 | case $SRCARCH in |
| 16 | x86|x86_64) BCJ=--x86 ;; | 16 | x86) BCJ=--x86 ;; |
| 17 | powerpc) BCJ=--powerpc ;; | 17 | powerpc) BCJ=--powerpc ;; |
| 18 | ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;; | 18 | ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;; |
| 19 | arm) BCJ=--arm ;; | 19 | arm) BCJ=--arm ;; |
