From: Russell King <rmk+lkml@arm.linux.org.uk>
To: David Miller <davem@davemloft.net>,
sam@ravnborg.org, cw@f00f.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make modpost section warnings clearer
Date: Thu, 10 May 2007 23:03:25 +0100 [thread overview]
Message-ID: <20070510220325.GI29713@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20070510215920.GH29713@flint.arm.linux.org.uk>
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>
---
Yes, I build-tested the last patch but it didn't throw any warnings.
Here's a corrected patch.
scripts/mod/modpost.c | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 113dc77..acd28ab 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, (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, (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, (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, (long long)r.r_offset,
+ secname, refsymname);
}
}
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2007-05-10 22:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 20:34 (hacky) [PATCH] silence MODPOST section mismatch warnings Chris Wedgwood
2007-05-10 20:40 ` Russell King
2007-05-10 21:01 ` David Miller
2007-05-10 21:14 ` Sam Ravnborg
2007-05-10 20:51 ` David Miller
2007-05-10 20:54 ` Russell King
2007-05-10 21:01 ` Sam Ravnborg
2007-05-11 6:28 ` Satyam Sharma
2007-05-10 21:07 ` David Miller
2007-05-10 21:23 ` Russell King
2007-05-10 21:59 ` Russell King
2007-05-10 22:03 ` Russell King [this message]
2007-05-10 22:08 ` [PATCH] Make modpost section warnings clearer David Miller
2007-05-10 22:16 ` (hacky) [PATCH] silence MODPOST section mismatch warnings Sam Ravnborg
2007-05-10 22:18 ` Russell King
2007-05-11 4:12 ` Sam Ravnborg
2007-05-11 18:54 ` Sam Ravnborg
2007-05-11 18:57 ` Russell King
2007-05-10 21:19 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070510220325.GI29713@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=cw@f00f.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.