mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	jgarzik <jgarzik@pobox.com>, akpm <akpm@osdl.org>
Subject: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
Date: Sat, 10 Jun 2006 12:13:35 -0700	[thread overview]
Message-ID: <20060610121335.447e19f2.rdunlap@xenotime.net> (raw)
In-Reply-To: <200606101211.k5ACBgtl029545@harpo.it.uu.se>

On Sat, 10 Jun 2006 14:11:42 +0200 (MEST) Mikael Pettersson wrote:

> While compiling 2.6.17-rc6 for a 486 with an NE2000 ISA ethernet card, I got:
> 
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x158) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x176) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x183) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x1ea) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x251) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x266) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x29b) and 'ne_block_input'
> 
> Not sure how serious this is; the driver seems to work fine later on.

Doesn't look serious.  init_module() is not __init, but it calls
some __init functions and touches some __initdata.

BTW, I would be happy to see some consistent results from modpost
section checking.  I don't see all of these warnings (I see only 1)
when using gcc 3.3.6.  What gcc version are you using?
Does that matter?  (not directed at anyone in particular)

Patch below fixes it for me.  Please test/report.
---

From: Randy Dunlap <rdunlap@xenotime.net>

Fix section mismatch warnings:
WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x396) and 'cleanup_card'
WARNING: drivers/net/ne2.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x483) and 'cleanup_card'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 drivers/net/ne.c  |    2 +-
 drivers/net/ne2.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- linux-2617-rc6.orig/drivers/net/ne.c
+++ linux-2617-rc6/drivers/net/ne.c
@@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
 is at boot) and so the probe will get confused by any other 8390 cards.
 ISA device autoprobes on a running machine are not recommended anyway. */
 
-int init_module(void)
+int __init init_module(void)
 {
 	int this_dev, found = 0;
 
--- linux-2617-rc6.orig/drivers/net/ne2.c
+++ linux-2617-rc6/drivers/net/ne2.c
@@ -780,7 +780,7 @@ MODULE_PARM_DESC(bad, "(ignored)");
 
 /* Module code fixed by David Weinehall */
 
-int init_module(void)
+int __init init_module(void)
 {
 	struct net_device *dev;
 	int this_dev, found = 0;

  reply	other threads:[~2006-06-10 19:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-10 12:11 Mikael Pettersson
2006-06-10 19:13 ` Randy.Dunlap [this message]
2006-06-10 20:38   ` [PATCH] " Sam Ravnborg
2006-06-11 10:23     ` Jan Engelhardt
2006-06-11  0:51 Mikael Pettersson
2006-06-11 10:25 ` Jan Engelhardt
2006-06-13  5:35 ` Keith Owens
2006-06-13 15:11   ` Randy.Dunlap
2006-06-13 20:38   ` Sam Ravnborg
2006-06-11 14:37 Mikael Pettersson
2006-06-11 21:54 ` 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=20060610121335.447e19f2.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=netdev@vger.kernel.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

all inboxes | Powered by JetHome®