Re: [BUG]2.5.49-ac1 - more info on make error

Adrian Bunk (bunk@fs.tum.de)
Mon, 2 Dec 2002 19:22:14 +0100


On Wed, Nov 27, 2002 at 03:45:24PM -0500, Bill Davidsen wrote:

>...
Content-Description: config
>...
> CONFIG_HOTPLUG=y
>...
> #
> # Tulip family network device support
> #
> CONFIG_NET_TULIP=y
> CONFIG_DE2104X=y
>...

./drivers/net/tulip/de2104x.o(.data+0x74): undefined reference to `local
symbols in discarded section .exit.text'

In drivers/net/tulip/de2104x.c the function de_remove_on is __exit but
the pointer to it is __devexit_p.

Two possible solutions:

1. Make this driver hot-pluggable. Jeff Garzik vetoes against this
solution.

2. Change the __devexit_p to an #ifdef MODULE (it's ugly, but it lets
the driver compiles with all combinations of config options without
making it hot-pluggable):

--- drivers/net/tulip/de2104x.c.old 2002-12-02 19:16:24.000000000 +0100
+++ drivers/net/tulip/de2104x.c 2002-12-02 19:18:18.000000000 +0100
@@ -2217,8 +2217,9 @@
.name = DRV_NAME,
.id_table = de_pci_tbl,
.probe = de_init_one,
-#warning only here to fix build. should be __exit_p not __devexit_p.
- .remove = __devexit_p(de_remove_one),
+#ifdef MODULE
+ .remove = de_remove_one,
+#endif
#ifdef CONFIG_PM
.suspend = de_suspend,
.resume = de_resume,

cu
Adrian

-- 

"Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/