[PATCH] Section mismatch in drivers/net/ne.o during modpost
authorRandy.Dunlap <rdunlap@xenotime.net>
Sat, 10 Jun 2006 19:13:35 +0000 (12:13 -0700)
committerJeff Garzik <jeff@garzik.org>
Sun, 11 Jun 2006 16:16:01 +0000 (12:16 -0400)
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.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ne.c
drivers/net/ne2.c

index b32765215f75c12d983df36349d4f6acbe4e453f..963a11fa9fe2eb7accd49bd057dbc5edcb67863d 100644 (file)
@@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 based probe to take place (as it
 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;
 
index 2aa7b77f84f805cd0f652fca5c22ba54468457ec..eebf5f02b4763071ac50f2f343a8f6fbf7e0bcad 100644 (file)
@@ -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;
This page took 0.02645 seconds and 5 git commands to generate.