diff options
author | Russell King <rmk+lkml@arm.linux.org.uk> | 2007-05-10 23:03:25 +0100 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-19 09:11:57 +0200 |
commit | 2560120997403581dd824e5bd2389c719edcbf12 (patch) | |
tree | 4f4bb0ea08dc828864c315d67ba78ed352f6ea79 /scripts | |
parent | 03c9587d752669a12fd553b0cbd835f77b176607 (diff) | |
download | linux-stable-2560120997403581dd824e5bd2389c719edcbf12.tar.gz linux-stable-2560120997403581dd824e5bd2389c719edcbf12.tar.bz2 linux-stable-2560120997403581dd824e5bd2389c719edcbf12.zip |
kbuild: make modpost section warnings clearer
Change modpost section mismatch warnings to be less confusing;
model them on the binutils linker warnings which we all know how
to interpret.
Also, fix the wrong ordering of arguments for the final case -
fromsec and refsymname were reversed.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 113dc77b9f60..2fcdbc7a1ee5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -885,29 +885,28 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, return; if (before && after) { - warn("%s - Section mismatch: reference to %s:%s from %s " - "between '%s' (at offset 0x%llx) and '%s'\n", - modname, secname, refsymname, fromsec, + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " + "(between '%s' and '%s')\n", + modname, fromsec, (unsigned long long)r.r_offset, + secname, refsymname, elf->strtab + before->st_name, - (long long)r.r_offset, elf->strtab + after->st_name); } else if (before) { - warn("%s - Section mismatch: reference to %s:%s from %s " - "after '%s' (at offset 0x%llx)\n", - modname, secname, refsymname, fromsec, - elf->strtab + before->st_name, - (long long)r.r_offset); + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " + "(after '%s')\n", + modname, fromsec, (unsigned long long)r.r_offset, + secname, refsymname, + elf->strtab + before->st_name); } else if (after) { - warn("%s - Section mismatch: reference to %s:%s from %s " + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " "before '%s' (at offset -0x%llx)\n", - modname, secname, refsymname, fromsec, - elf->strtab + after->st_name, - (long long)r.r_offset); + modname, fromsec, (unsigned long long)r.r_offset, + secname, refsymname, + elf->strtab + after->st_name); } else { - warn("%s - Section mismatch: reference to %s:%s from %s " - "(offset 0x%llx)\n", - modname, secname, fromsec, refsymname, - (long long)r.r_offset); + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n", + modname, fromsec, (unsigned long long)r.r_offset, + secname, refsymname); } } |