mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Toralf Förster" <toralf.foerster@gmx.de>,
	linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
	"WANG Cong" <xiyou.wangcong@gmail.com>
Subject: [PATCH for -rc] kbuild: fix false section mismatch warning referring to .init.text.2
Date: Fri, 18 Jan 2008 20:03:02 +0100	[thread overview]
Message-ID: <20080118190302.GA20285@uranus.ravnborg.org> (raw)
In-Reply-To: <20080118161452.GJ2559@hacking>

Hi Linus.

Please pull following two-liner fix for modpost.
It silence an annoying section mismatch warning.

Pull from:

   ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild.git

	Sam


>From 57ff41164d27cb577620a6e8085dd67cd8a87649 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Fri, 18 Jan 2008 19:54:51 +0100
Subject: [PATCH] kbuild: fix false section mismatch warning referring to .init.text.2
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

The following section mismatch warning are false:
WARNING: vmlinux.o(.text.head+0x247): Section mismatch: reference to .init.text.1:start_kernel (between 'is386' and 'check_x87')

The problem was that modpost did not see a section named
".init.text.1" as an init section and thus it warned.

This patch fixes this so we no loneg see this warning.
Thanks to report from: Toralf Förster

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Toralf Förster <toralf.foerster@gmx.de>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
---
 scripts/mod/modpost.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 93ac52a..b5f1cff 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -736,8 +736,8 @@ static int secref_whitelist(const char *modname, const char *tosec,
 
 	/* Check for pattern 3 */
 	if ((strcmp(fromsec, ".text.head") == 0) &&
-		((strcmp(tosec, ".init.data") == 0) ||
-		(strcmp(tosec, ".init.text") == 0)))
+		((strncmp(tosec, ".init.data", strlen(".init.data")) == 0) ||
+		(strncmp(tosec, ".init.text", strlen(".init.text")) == 0)))
 	return 1;
 
 	/* Check for pattern 4 */
-- 
1.5.4.rc3.14.g44397


  parent reply	other threads:[~2008-01-18 19:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 12:18 build #343 issue for v2.6.24-rc8-29-g03bbe08 : Section mismatch: reference to .init.text.1:start_kernel (between 'is386' and 'check_x87') Toralf Förster
2008-01-18 12:29 ` WANG Cong
2008-01-18 12:46   ` Sam Ravnborg
2008-01-18 12:51     ` WANG Cong
2008-01-18 13:22       ` Sam Ravnborg
2008-01-18 16:14         ` WANG Cong
2008-01-18 18:47           ` Sam Ravnborg
2008-01-19 11:20             ` WANG Cong
2008-01-18 19:03           ` Sam Ravnborg [this message]
2008-01-19 13:17           ` [PATCH] xen: fix section usage in xen-head.S Sam Ravnborg
2008-01-19 21:20             ` [updated PATCH] xen: fix section usage in xen-head.S and setup.c Sam Ravnborg
2008-01-19 22:23               ` Jeremy Fitzhardinge
2008-01-19 22:43                 ` 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=20080118190302.GA20285@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=toralf.foerster@gmx.de \
    --cc=torvalds@linux-foundation.org \
    --cc=xiyou.wangcong@gmail.com \
    /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

all inboxes | Powered by JetHome®