aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/Kbuild.include8
-rw-r--r--scripts/mod/modpost.c37
-rw-r--r--scripts/package/builddeb3
4 files changed, 31 insertions, 18 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore
index a1f52cb47200..b939fbd01195 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -6,3 +6,4 @@ kallsyms
6pnmtologo 6pnmtologo
7bin2c 7bin2c
8unifdef 8unifdef
9binoffset
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index b96ea8d6a5ed..da3559ea92e0 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -39,15 +39,19 @@ escsq = $(subst $(squote),'\$(squote)',$1)
39# - If they are equal no change, and no timestamp update 39# - If they are equal no change, and no timestamp update
40# - stdin is piped in from the first prerequisite ($<) so one has 40# - stdin is piped in from the first prerequisite ($<) so one has
41# to specify a valid file as first prerequisite (often the kbuild file) 41# to specify a valid file as first prerequisite (often the kbuild file)
42 quiet_chk_filechk = echo ' CHK $@'
43silent_chk_filechk = :
44 quiet_upd_filechk = echo ' UPD $@'
45silent_upd_filechk = :
42define filechk 46define filechk
43 $(Q)set -e; \ 47 $(Q)set -e; \
44 echo ' CHK $@'; \ 48 $($(quiet)chk_filechk); \
45 mkdir -p $(dir $@); \ 49 mkdir -p $(dir $@); \
46 $(filechk_$(1)) < $< > $@.tmp; \ 50 $(filechk_$(1)) < $< > $@.tmp; \
47 if [ -r $@ ] && cmp -s $@ $@.tmp; then \ 51 if [ -r $@ ] && cmp -s $@ $@.tmp; then \
48 rm -f $@.tmp; \ 52 rm -f $@.tmp; \
49 else \ 53 else \
50 echo ' UPD $@'; \ 54 $($(quiet)upd_filechk); \
51 mv -f $@.tmp $@; \ 55 mv -f $@.tmp $@; \
52 fi 56 fi
53endef 57endef
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 5d546466e6b1..dbe1fb5e8cc0 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -613,7 +613,7 @@ static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)
613 if (sym) 613 if (sym)
614 return elf->strtab + sym->st_name; 614 return elf->strtab + sym->st_name;
615 else 615 else
616 return ""; 616 return "(unknown)";
617} 617}
618 618
619static const char *sec_name(struct elf_info *elf, int shndx) 619static const char *sec_name(struct elf_info *elf, int shndx)
@@ -1102,7 +1102,7 @@ static int is_function(Elf_Sym *sym)
1102 if (sym) 1102 if (sym)
1103 return ELF_ST_TYPE(sym->st_info) == STT_FUNC; 1103 return ELF_ST_TYPE(sym->st_info) == STT_FUNC;
1104 else 1104 else
1105 return 0; 1105 return -1;
1106} 1106}
1107 1107
1108/* 1108/*
@@ -1120,24 +1120,31 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch,
1120{ 1120{
1121 const char *from, *from_p; 1121 const char *from, *from_p;
1122 const char *to, *to_p; 1122 const char *to, *to_p;
1123 from = from_is_func ? "function" : "variable"; 1123
1124 from_p = from_is_func ? "()" : ""; 1124 switch (from_is_func) {
1125 to = to_is_func ? "function" : "variable"; 1125 case 0: from = "variable"; from_p = ""; break;
1126 to_p = to_is_func ? "()" : ""; 1126 case 1: from = "function"; from_p = "()"; break;
1127 default: from = "(unknown reference)"; from_p = ""; break;
1128 }
1129 switch (to_is_func) {
1130 case 0: to = "variable"; to_p = ""; break;
1131 case 1: to = "function"; to_p = "()"; break;
1132 default: to = "(unknown reference)"; to_p = ""; break;
1133 }
1127 1134
1128 sec_mismatch_count++; 1135 sec_mismatch_count++;
1129 if (!sec_mismatch_verbose) 1136 if (!sec_mismatch_verbose)
1130 return; 1137 return;
1131 1138
1132 fprintf(stderr, "WARNING: %s(%s+0x%llx): Section mismatch in" 1139 warn("%s(%s+0x%llx): Section mismatch in reference from the %s %s%s "
1133 " reference from the %s %s%s to the %s %s:%s%s\n", 1140 "to the %s %s:%s%s\n",
1134 modname, fromsec, fromaddr, from, fromsym, from_p, 1141 modname, fromsec, fromaddr, from, fromsym, from_p, to, tosec,
1135 to, tosec, tosym, to_p); 1142 tosym, to_p);
1136 1143
1137 switch (mismatch) { 1144 switch (mismatch) {
1138 case TEXT_TO_INIT: 1145 case TEXT_TO_INIT:
1139 fprintf(stderr, 1146 fprintf(stderr,
1140 "The function %s %s() references\n" 1147 "The function %s%s() references\n"
1141 "the %s %s%s%s.\n" 1148 "the %s %s%s%s.\n"
1142 "This is often because %s lacks a %s\n" 1149 "This is often because %s lacks a %s\n"
1143 "annotation or the annotation of %s is wrong.\n", 1150 "annotation or the annotation of %s is wrong.\n",
@@ -1938,10 +1945,10 @@ int main(int argc, char **argv)
1938 if (dump_write) 1945 if (dump_write)
1939 write_dump(dump_write); 1946 write_dump(dump_write);
1940 if (sec_mismatch_count && !sec_mismatch_verbose) 1947 if (sec_mismatch_count && !sec_mismatch_verbose)
1941 fprintf(stderr, "modpost: Found %d section mismatch(es).\n" 1948 warn("modpost: Found %d section mismatch(es).\n"
1942 "To see full details build your kernel with:\n" 1949 "To see full details build your kernel with:\n"
1943 "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n", 1950 "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
1944 sec_mismatch_count); 1951 sec_mismatch_count);
1945 1952
1946 return err; 1953 return err;
1947} 1954}
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 0f657b5f3bc8..ba6bf5d5abf9 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -13,6 +13,7 @@ set -e
13 13
14# Some variables and settings used throughout the script 14# Some variables and settings used throughout the script
15version=$KERNELRELEASE 15version=$KERNELRELEASE
16revision=`cat .version`
16tmpdir="$objtree/debian/tmp" 17tmpdir="$objtree/debian/tmp"
17packagename=linux-$version 18packagename=linux-$version
18 19
@@ -65,7 +66,7 @@ done
65name="Kernel Compiler <$(id -nu)@$(hostname -f)>" 66name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
66# Generate a simple changelog template 67# Generate a simple changelog template
67cat <<EOF > debian/changelog 68cat <<EOF > debian/changelog
68linux ($version) unstable; urgency=low 69linux ($version-$revision) unstable; urgency=low
69 70
70 * A standard release 71 * A standard release
71 72