diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.headersinst | 2 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 24 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 11 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 90 | ||||
-rw-r--r-- | scripts/mod/sumversion.c | 1 | ||||
-rw-r--r-- | scripts/package/buildtar | 4 |
6 files changed, 58 insertions, 74 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index f7b6705fd6a3..8cd63014a0d1 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -144,7 +144,7 @@ $(check-y) : $(INSTALL_HDR_PATH)/$(_dst)/.check.%.h : $(INSTALL_HDR_PATH)/$(_dst | |||
144 | $(call cmd,check) | 144 | $(call cmd,check) |
145 | 145 | ||
146 | # Other dependencies for $(check-y) | 146 | # Other dependencies for $(check-y) |
147 | -include /dev/null $(check-y) | 147 | include /dev/null $(wildcard $(check-y)) |
148 | 148 | ||
149 | # ... but leave $(check-y) as .PHONY for now until those deps are actually correct. | 149 | # ... but leave $(check-y) as .PHONY for now until those deps are actually correct. |
150 | .PHONY: $(check-y) | 150 | .PHONY: $(check-y) |
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index 120d624e672c..cdca7388e0f1 100644 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh | |||
@@ -4,21 +4,15 @@ | |||
4 | # What library to link | 4 | # What library to link |
5 | ldflags() | 5 | ldflags() |
6 | { | 6 | { |
7 | $cc -print-file-name=libncursesw.so | grep -q / | 7 | for ext in so a dylib ; do |
8 | if [ $? -eq 0 ]; then | 8 | for lib in ncursesw ncurses curses ; do |
9 | echo '-lncursesw' | 9 | $cc -print-file-name=lib${lib}.${ext} | grep -q / |
10 | exit | 10 | if [ $? -eq 0 ]; then |
11 | fi | 11 | echo "-l${lib}" |
12 | $cc -print-file-name=libncurses.so | grep -q / | 12 | exit |
13 | if [ $? -eq 0 ]; then | 13 | fi |
14 | echo '-lncurses' | 14 | done |
15 | exit | 15 | done |
16 | fi | ||
17 | $cc -print-file-name=libcurses.so | grep -q / | ||
18 | if [ $? -eq 0 ]; then | ||
19 | echo '-lcurses' | ||
20 | exit | ||
21 | fi | ||
22 | exit 1 | 16 | exit 1 |
23 | } | 17 | } |
24 | 18 | ||
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index ed1244dd58d0..f646381dc015 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -353,11 +353,16 @@ static int do_pcmcia_entry(const char *filename, | |||
353 | 353 | ||
354 | static int do_of_entry (const char *filename, struct of_device_id *of, char *alias) | 354 | static int do_of_entry (const char *filename, struct of_device_id *of, char *alias) |
355 | { | 355 | { |
356 | int len; | ||
356 | char *tmp; | 357 | char *tmp; |
357 | sprintf (alias, "of:N%sT%sC%s", | 358 | len = sprintf (alias, "of:N%sT%s", |
358 | of->name[0] ? of->name : "*", | 359 | of->name[0] ? of->name : "*", |
359 | of->type[0] ? of->type : "*", | 360 | of->type[0] ? of->type : "*"); |
360 | of->compatible[0] ? of->compatible : "*"); | 361 | |
362 | if (of->compatible[0]) | ||
363 | sprintf (&alias[len], "%sC%s", | ||
364 | of->type[0] ? "*" : "", | ||
365 | of->compatible); | ||
361 | 366 | ||
362 | /* Replace all whitespace with underscores */ | 367 | /* Replace all whitespace with underscores */ |
363 | for (tmp = alias; tmp && *tmp; tmp++) | 368 | for (tmp = alias; tmp && *tmp; tmp++) |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 113dc77b9f60..8e5610d428c5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -582,6 +582,12 @@ static int strrcmp(const char *s, const char *sub) | |||
582 | 582 | ||
583 | /** | 583 | /** |
584 | * Whitelist to allow certain references to pass with no warning. | 584 | * Whitelist to allow certain references to pass with no warning. |
585 | * | ||
586 | * Pattern 0: | ||
587 | * Do not warn if funtion/data are marked with __init_refok/__initdata_refok. | ||
588 | * The pattern is identified by: | ||
589 | * fromsec = .text.init.refok | .data.init.refok | ||
590 | * | ||
585 | * Pattern 1: | 591 | * Pattern 1: |
586 | * If a module parameter is declared __initdata and permissions=0 | 592 | * If a module parameter is declared __initdata and permissions=0 |
587 | * then this is legal despite the warning generated. | 593 | * then this is legal despite the warning generated. |
@@ -619,14 +625,6 @@ static int strrcmp(const char *s, const char *sub) | |||
619 | * This pattern is identified by | 625 | * This pattern is identified by |
620 | * refsymname = __init_begin, _sinittext, _einittext | 626 | * refsymname = __init_begin, _sinittext, _einittext |
621 | * | 627 | * |
622 | * Pattern 6: | ||
623 | * During the early init phase we have references from .init.text to | ||
624 | * .text we have an intended section mismatch - do not warn about it. | ||
625 | * See kernel_init() in init/main.c | ||
626 | * tosec = .init.text | ||
627 | * fromsec = .text | ||
628 | * atsym = kernel_init | ||
629 | * | ||
630 | * Pattern 7: | 628 | * Pattern 7: |
631 | * Logos used in drivers/video/logo reside in __initdata but the | 629 | * Logos used in drivers/video/logo reside in __initdata but the |
632 | * funtion that references them are EXPORT_SYMBOL() so cannot be | 630 | * funtion that references them are EXPORT_SYMBOL() so cannot be |
@@ -642,16 +640,11 @@ static int strrcmp(const char *s, const char *sub) | |||
642 | * tosec = .init.text | 640 | * tosec = .init.text |
643 | * fromsec = .paravirtprobe | 641 | * fromsec = .paravirtprobe |
644 | * | 642 | * |
645 | * Pattern 9: | ||
646 | * Some of functions are common code between boot time and hotplug | ||
647 | * time. The bootmem allocater is called only boot time in its | ||
648 | * functions. So it's ok to reference. | ||
649 | * tosec = .init.text | ||
650 | * | ||
651 | * Pattern 10: | 643 | * Pattern 10: |
652 | * ia64 has machvec table for each platform. It is mixture of function | 644 | * ia64 has machvec table for each platform and |
653 | * pointer of .init.text and .text. | 645 | * powerpc has a machine desc table for each platform. |
654 | * fromsec = .machvec | 646 | * It is mixture of function pointers of .init.text and .text. |
647 | * fromsec = .machvec | .machine.desc | ||
655 | **/ | 648 | **/ |
656 | static int secref_whitelist(const char *modname, const char *tosec, | 649 | static int secref_whitelist(const char *modname, const char *tosec, |
657 | const char *fromsec, const char *atsym, | 650 | const char *fromsec, const char *atsym, |
@@ -678,11 +671,10 @@ static int secref_whitelist(const char *modname, const char *tosec, | |||
678 | NULL | 671 | NULL |
679 | }; | 672 | }; |
680 | 673 | ||
681 | const char *pat4sym[] = { | 674 | /* Check for pattern 0 */ |
682 | "sparse_index_alloc", | 675 | if ((strcmp(fromsec, ".text.init.refok") == 0) || |
683 | "zone_wait_table_init", | 676 | (strcmp(fromsec, ".data.init.refok") == 0)) |
684 | NULL | 677 | return 1; |
685 | }; | ||
686 | 678 | ||
687 | /* Check for pattern 1 */ | 679 | /* Check for pattern 1 */ |
688 | if (strcmp(tosec, ".init.data") != 0) | 680 | if (strcmp(tosec, ".init.data") != 0) |
@@ -725,12 +717,6 @@ static int secref_whitelist(const char *modname, const char *tosec, | |||
725 | if (strcmp(refsymname, *s) == 0) | 717 | if (strcmp(refsymname, *s) == 0) |
726 | return 1; | 718 | return 1; |
727 | 719 | ||
728 | /* Check for pattern 6 */ | ||
729 | if ((strcmp(tosec, ".init.text") == 0) && | ||
730 | (strcmp(fromsec, ".text") == 0) && | ||
731 | (strcmp(refsymname, "kernel_init") == 0)) | ||
732 | return 1; | ||
733 | |||
734 | /* Check for pattern 7 */ | 720 | /* Check for pattern 7 */ |
735 | if ((strcmp(tosec, ".init.data") == 0) && | 721 | if ((strcmp(tosec, ".init.data") == 0) && |
736 | (strncmp(fromsec, ".text", strlen(".text")) == 0) && | 722 | (strncmp(fromsec, ".text", strlen(".text")) == 0) && |
@@ -742,15 +728,9 @@ static int secref_whitelist(const char *modname, const char *tosec, | |||
742 | (strcmp(fromsec, ".paravirtprobe") == 0)) | 728 | (strcmp(fromsec, ".paravirtprobe") == 0)) |
743 | return 1; | 729 | return 1; |
744 | 730 | ||
745 | /* Check for pattern 9 */ | ||
746 | if ((strcmp(tosec, ".init.text") == 0) && | ||
747 | (strcmp(fromsec, ".text") == 0)) | ||
748 | for (s = pat4sym; *s; s++) | ||
749 | if (strcmp(atsym, *s) == 0) | ||
750 | return 1; | ||
751 | |||
752 | /* Check for pattern 10 */ | 731 | /* Check for pattern 10 */ |
753 | if (strcmp(fromsec, ".machvec") == 0) | 732 | if ((strcmp(fromsec, ".machvec") == 0) || |
733 | (strcmp(fromsec, ".machine.desc") == 0)) | ||
754 | return 1; | 734 | return 1; |
755 | 735 | ||
756 | return 0; | 736 | return 0; |
@@ -884,30 +864,34 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, | |||
884 | elf->strtab + before->st_name, refsymname)) | 864 | elf->strtab + before->st_name, refsymname)) |
885 | return; | 865 | return; |
886 | 866 | ||
867 | /* fromsec whitelist - without a valid 'before' | ||
868 | * powerpc has a GOT table in .got2 section */ | ||
869 | if (strcmp(fromsec, ".got2") == 0) | ||
870 | return; | ||
871 | |||
887 | if (before && after) { | 872 | if (before && after) { |
888 | warn("%s - Section mismatch: reference to %s:%s from %s " | 873 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |
889 | "between '%s' (at offset 0x%llx) and '%s'\n", | 874 | "(between '%s' and '%s')\n", |
890 | modname, secname, refsymname, fromsec, | 875 | modname, fromsec, (unsigned long long)r.r_offset, |
876 | secname, refsymname, | ||
891 | elf->strtab + before->st_name, | 877 | elf->strtab + before->st_name, |
892 | (long long)r.r_offset, | ||
893 | elf->strtab + after->st_name); | 878 | elf->strtab + after->st_name); |
894 | } else if (before) { | 879 | } else if (before) { |
895 | warn("%s - Section mismatch: reference to %s:%s from %s " | 880 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |
896 | "after '%s' (at offset 0x%llx)\n", | 881 | "(after '%s')\n", |
897 | modname, secname, refsymname, fromsec, | 882 | modname, fromsec, (unsigned long long)r.r_offset, |
898 | elf->strtab + before->st_name, | 883 | secname, refsymname, |
899 | (long long)r.r_offset); | 884 | elf->strtab + before->st_name); |
900 | } else if (after) { | 885 | } else if (after) { |
901 | warn("%s - Section mismatch: reference to %s:%s from %s " | 886 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |
902 | "before '%s' (at offset -0x%llx)\n", | 887 | "before '%s' (at offset -0x%llx)\n", |
903 | modname, secname, refsymname, fromsec, | 888 | modname, fromsec, (unsigned long long)r.r_offset, |
904 | elf->strtab + after->st_name, | 889 | secname, refsymname, |
905 | (long long)r.r_offset); | 890 | elf->strtab + after->st_name); |
906 | } else { | 891 | } else { |
907 | warn("%s - Section mismatch: reference to %s:%s from %s " | 892 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n", |
908 | "(offset 0x%llx)\n", | 893 | modname, fromsec, (unsigned long long)r.r_offset, |
909 | modname, secname, fromsec, refsymname, | 894 | secname, refsymname); |
910 | (long long)r.r_offset); | ||
911 | } | 895 | } |
912 | } | 896 | } |
913 | 897 | ||
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 6873d5af80d5..d9cc6901d680 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <ctype.h> | 7 | #include <ctype.h> |
8 | #include <errno.h> | 8 | #include <errno.h> |
9 | #include <string.h> | 9 | #include <string.h> |
10 | #include <limits.h> | ||
10 | #include "modpost.h" | 11 | #include "modpost.h" |
11 | 12 | ||
12 | /* | 13 | /* |
diff --git a/scripts/package/buildtar b/scripts/package/buildtar index 88b5281ac41e..aa0ccdbd1f47 100644 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar | |||
@@ -69,8 +69,8 @@ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" | |||
69 | # Install arch-specific kernel image(s) | 69 | # Install arch-specific kernel image(s) |
70 | # | 70 | # |
71 | case "${ARCH}" in | 71 | case "${ARCH}" in |
72 | i386) | 72 | i386|x86_64) |
73 | [ -f "${objtree}/arch/i386/boot/bzImage" ] && cp -v -- "${objtree}/arch/i386/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" | 73 | [ -f "${objtree}/arch/$ARCH/boot/bzImage" ] && cp -v -- "${objtree}/arch/$ARCH/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" |
74 | ;; | 74 | ;; |
75 | alpha) | 75 | alpha) |
76 | [ -f "${objtree}/arch/alpha/boot/vmlinux.gz" ] && cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" | 76 | [ -f "${objtree}/arch/alpha/boot/vmlinux.gz" ] && cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" |