mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: WANG Cong <xiyou.wangcong@gmail.com>
Cc: "Toralf Förster" <toralf.foerster@gmx.de>,
	linux-kernel@vger.kernel.org, rusty@rustcorp.com.au
Subject: Re: build #343 issue for v2.6.24-rc8-29-g03bbe08 : Section mismatch: reference to .init.text.1:start_kernel (between 'is386' and 'check_x87')
Date: Fri, 18 Jan 2008 13:46:27 +0100	[thread overview]
Message-ID: <20080118124627.GA17918@uranus.ravnborg.org> (raw)
In-Reply-To: <20080118122917.GH2559@hacking>

On Fri, Jan 18, 2008 at 08:29:17PM +0800, WANG Cong wrote:
> On Fri, Jan 18, 2008 at 01:18:27PM +0100, Toralf Förster wrote:
> >Hello,
> >
> >the build with the attached .config was successful however I got during make :
> >  AS      .tmp_kallsyms2.o
> >  LD      vmlinux.o
> >  MODPOST vmlinux.o
> >WARNING: vmlinux.o(.text.head+0x247): Section mismatch: reference to .init.text.1:start_kernel (between 'is386' and 'check_x87')
> >  CHK     include/linux/version.h
> >  HOSTCC  scripts/unifdef
> >  MKDIR   include
> >
> >Does it help / make sense to report such warning ?
> >
> >The build was made with :
> >$> make mrproper && make rndconfig && <tweak config file> && make oldconfig && make
> >
> >Here's the config:
> 
> Thanks. You have reported this. ;)
> 
> I can't solve this problem. Let's Cc Rusty and Sam to see
> if they can solve this.

modpost gets confused by the section named ".init.text.1" - the additional '.1'
is unexpected.

Following untested patch should fix it.

	Sam

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 */

  reply	other threads:[~2008-01-18 12:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 12:18 Toralf Förster
2008-01-18 12:29 ` WANG Cong
2008-01-18 12:46   ` Sam Ravnborg [this message]
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           ` [PATCH for -rc] kbuild: fix false section mismatch warning referring to .init.text.2 Sam Ravnborg
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=20080118124627.GA17918@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=toralf.foerster@gmx.de \
    --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

Powered by JetHome