diff options
author | Russell King <rmk+lkml@arm.linux.org.uk> | 2007-05-10 18:03:25 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-19 03:11:57 -0400 |
commit | 2560120997403581dd824e5bd2389c719edcbf12 (patch) | |
tree | 4f4bb0ea08dc828864c315d67ba78ed352f6ea79 /scripts | |
parent | 03c9587d752669a12fd553b0cbd835f77b176607 (diff) |
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, | |||
885 | return; | 885 | return; |
886 | 886 | ||
887 | if (before && after) { | 887 | if (before && after) { |
888 | warn("%s - Section mismatch: reference to %s:%s from %s " | 888 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |
889 | "between '%s' (at offset 0x%llx) and '%s'\n", | 889 | "(between '%s' and '%s')\n", |
890 | modname, secname, refsymname, fromsec, | 890 | modname, fromsec, (unsigned long long)r.r_offset, |
891 | secname, refsymname, | ||
891 | elf->strtab + before->st_name, | 892 | elf->strtab + before->st_name, |
892 | (long long)r.r_offset, | ||
893 | elf->strtab + after->st_name); | 893 | elf->strtab + after->st_name); |
894 | } else if (before) { | 894 | } else if (before) { |
895 | warn("%s - Section mismatch: reference to %s:%s from %s " | 895 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |
896 | "after '%s' (at offset 0x%llx)\n", | 896 | "(after '%s')\n", |
897 | modname, secname, refsymname, fromsec, | 897 | modname, fromsec, (unsigned long long)r.r_offset, |
898 | elf->strtab + before->st_name, | 898 | secname, refsymname, |
899 | (long long)r.r_offset); | 899 | elf->strtab + before->st_name); |
900 | } else if (after) { | 900 | } else if (after) { |
901 | warn("%s - Section mismatch: reference to %s:%s from %s " | 901 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s " |
902 | "before '%s' (at offset -0x%llx)\n", | 902 | "before '%s' (at offset -0x%llx)\n", |
903 | modname, secname, refsymname, fromsec, | 903 | modname, fromsec, (unsigned long long)r.r_offset, |
904 | elf->strtab + after->st_name, | 904 | secname, refsymname, |
905 | (long long)r.r_offset); | 905 | elf->strtab + after->st_name); |
906 | } else { | 906 | } else { |
907 | warn("%s - Section mismatch: reference to %s:%s from %s " | 907 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n", |
908 | "(offset 0x%llx)\n", | 908 | modname, fromsec, (unsigned long long)r.r_offset, |
909 | modname, secname, fromsec, refsymname, | 909 | secname, refsymname); |
910 | (long long)r.r_offset); | ||
911 | } | 910 | } |
912 | } | 911 | } |
913 | 912 | ||