diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-09 11:14:20 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-09 11:14:20 -0800 |
commit | 451688ba0b488faf274e13dc591734b1e695642c (patch) | |
tree | 7d746efef856c1897697c30e2486317e823e727d /scripts | |
parent | acac103e2d00c9bc7507838319c71a0f5dc50678 (diff) | |
parent | ed2c9fa53b7a3e240a64e6e97494d72d0f80eed0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit>
ide: introduce HAVE_IDE
kbuild: silence CHK/UPD messages according to $(quiet)
scsi: fix makefile for aic7(3*x)
kbuild/modpost: Use warn() for announcing section mismatches
Add binoffset to gitignore
kbuild/modpost: improve warnings if symbol is unknown
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/.gitignore | 1 | ||||
-rw-r--r-- | scripts/Kbuild.include | 8 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 37 | ||||
-rw-r--r-- | scripts/package/builddeb | 3 |
4 files changed, 31 insertions, 18 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore index a1f52cb4720..b939fbd0119 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -6,3 +6,4 @@ kallsyms pnmtologo bin2c unifdef +binoffset diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index b96ea8d6a5e..da3559ea92e 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -39,15 +39,19 @@ escsq = $(subst $(squote),'\$(squote)',$1) # - If they are equal no change, and no timestamp update # - stdin is piped in from the first prerequisite ($<) so one has # to specify a valid file as first prerequisite (often the kbuild file) + quiet_chk_filechk = echo ' CHK $@' +silent_chk_filechk = : + quiet_upd_filechk = echo ' UPD $@' +silent_upd_filechk = : define filechk $(Q)set -e; \ - echo ' CHK $@'; \ + $($(quiet)chk_filechk); \ mkdir -p $(dir $@); \ $(filechk_$(1)) < $< > $@.tmp; \ if [ -r $@ ] && cmp -s $@ $@.tmp; then \ rm -f $@.tmp; \ else \ - echo ' UPD $@'; \ + $($(quiet)upd_filechk); \ mv -f $@.tmp $@; \ fi endef diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 5d546466e6b..dbe1fb5e8cc 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) if (sym) return elf->strtab + sym->st_name; else - return ""; + return "(unknown)"; } static const char *sec_name(struct elf_info *elf, int shndx) @@ -1102,7 +1102,7 @@ static int is_function(Elf_Sym *sym) if (sym) return ELF_ST_TYPE(sym->st_info) == STT_FUNC; else - return 0; + return -1; } /* @@ -1120,24 +1120,31 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch, { const char *from, *from_p; const char *to, *to_p; - from = from_is_func ? "function" : "variable"; - from_p = from_is_func ? "()" : ""; - to = to_is_func ? "function" : "variable"; - to_p = to_is_func ? "()" : ""; + + switch (from_is_func) { + case 0: from = "variable"; from_p = ""; break; + case 1: from = "function"; from_p = "()"; break; + default: from = "(unknown reference)"; from_p = ""; break; + } + switch (to_is_func) { + case 0: to = "variable"; to_p = ""; break; + case 1: to = "function"; to_p = "()"; break; + default: to = "(unknown reference)"; to_p = ""; break; + } sec_mismatch_count++; if (!sec_mismatch_verbose) return; - fprintf(stderr, "WARNING: %s(%s+0x%llx): Section mismatch in" - " reference from the %s %s%s to the %s %s:%s%s\n", - modname, fromsec, fromaddr, from, fromsym, from_p, - to, tosec, tosym, to_p); + warn("%s(%s+0x%llx): Section mismatch in reference from the %s %s%s " + "to the %s %s:%s%s\n", + modname, fromsec, fromaddr, from, fromsym, from_p, to, tosec, + tosym, to_p); switch (mismatch) { case TEXT_TO_INIT: fprintf(stderr, - "The function %s %s() references\n" + "The function %s%s() references\n" "the %s %s%s%s.\n" "This is often because %s lacks a %s\n" "annotation or the annotation of %s is wrong.\n", @@ -1938,10 +1945,10 @@ int main(int argc, char **argv) if (dump_write) write_dump(dump_write); if (sec_mismatch_count && !sec_mismatch_verbose) - fprintf(stderr, "modpost: Found %d section mismatch(es).\n" - "To see full details build your kernel with:\n" - "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n", - sec_mismatch_count); + warn("modpost: Found %d section mismatch(es).\n" + "To see full details build your kernel with:\n" + "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n", + sec_mismatch_count); return err; } diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 0f657b5f3bc..ba6bf5d5abf 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -13,6 +13,7 @@ set -e # Some variables and settings used throughout the script version=$KERNELRELEASE +revision=`cat .version` tmpdir="$objtree/debian/tmp" packagename=linux-$version @@ -65,7 +66,7 @@ done name="Kernel Compiler <$(id -nu)@$(hostname -f)>" # Generate a simple changelog template cat <<EOF > debian/changelog -linux ($version) unstable; urgency=low +linux ($version-$revision) unstable; urgency=low * A standard release |