virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@osdl.org>,
	virtualization <virtualization@lists.osdl.org>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lguest: clean rest of linkage warnings (bar one)
Date: Fri, 23 Mar 2007 20:05:02 +0100	[thread overview]
Message-ID: <20070323190502.GA8512@uranus.ravnborg.org> (raw)
In-Reply-To: <1174634740.29496.12.camel@localhost.localdomain>

On Fri, Mar 23, 2007 at 06:25:39PM +1100, Rusty Russell wrote:
> On Thu, 2007-03-22 at 12:45 +0100, Sam Ravnborg wrote:
> > On Thu, Mar 22, 2007 at 09:09:42PM +1100, Rusty Russell wrote:
> > > It also fixes the remaining warnings, except one.  The code in
> > > modpost.c which needs to be taught that it's legal to link from
> > > .paravirtprobe to .init.text is horrible, and I'm pretty sure I'd just
> > > make it worse.
> > 
> > If you drop me a sample of the exact warning I will add this one too.
> > Current kbuild.git contains a lot of fixes in this area so I refer to
> > do so on top of that tree.
> 
> WARNING: vmlinux - Section mismatch: reference to .init.text: from .paravirtprobe between '__start_paravirtprobe' (at offset 0xc0464c7c) and '__stop_paravirtprobe'
> 
> Sam, you're always so polite and damn helpful: I'm pretty sure that
> violates the core tenets of Linux etiquette.
I get this strange feeling that you are planning to ask me to do much more....

Anyway I have added following path to kbuild.git.
Two small unrelated changes sneaked in (deleting a wrong part of a 
comment and adding an empty line)

It should apply on top of latest -mm

	Sam

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 06a16ac..1e578fd 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -626,7 +626,6 @@ static int strrcmp(const char *s, const char *sub)
  *   tosec   = .init.text
  *   fromsec = .text
  *   atsym = kernel_init
- *   Some symbols belong to init section but still it is ok to reference
  *
  * Pattern 7:
  *  Logos used in drivers/video/logo reside in __initdata but the
@@ -643,6 +642,13 @@ static int strrcmp(const char *s, const char *sub)
  *  The pattern is:
  *  tosec    = .init.text
  *  fromsec  = __ksymtab*
+ *
+ * Pattern 9:
+ *  Symbols contained in .paravirtprobe amy safely reference
+ *  .init.text.
+ *  The pattern is:
+ *  tosec   = .init.text
+ *  fromsec  = .paravirtprobe
  **/
 static int secref_whitelist(const char *modname, const char *tosec,
 			    const char *fromsec, const char *atsym,
@@ -720,10 +726,17 @@ static int secref_whitelist(const char *modname, const char *tosec,
 	    (strncmp(fromsec, ".text", strlen(".text")) == 0) &&
 	    (strncmp(refsymname, "logo_", strlen("logo_")) == 0))
 		return 1;
+
 	/* Check for pattern 8 */
 	if ((strcmp(tosec, ".init.text") == 0) &&
 	    (strncmp(fromsec, "__ksymtab", strlen("__ksymtab")) == 0))
 		return 1;
+
+	/* Check for pattern 9 */
+	if ((strcmp(tosec, ".init.text") == 0) &&
+	    (strcmp(fromsec, ".paravirtprobe") == 0))
+		return 1;
+
 	return 0;
 }
 

      reply	other threads:[~2007-03-23 19:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22  2:57 [PATCH] lguest: clean up some l"references .init.text" warnings Rusty Russell
2007-03-22 10:09 ` [PATCH] lguest: clean rest of linkage warnings (bar one) Rusty Russell
2007-03-22 11:45   ` Sam Ravnborg
2007-03-23  7:25     ` Rusty Russell
2007-03-23 19:05       ` Sam Ravnborg [this message]

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=20070323190502.GA8512@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).