* Linking fails on sparc64 with 2.6.15-rc6 and Sun GEM Ethernet driver @ 2005-12-21 12:23 Nils Meyer 2005-12-21 13:25 ` [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit Adrian Bunk 0 siblings, 1 reply; 3+ messages in thread From: Nils Meyer @ 2005-12-21 12:23 UTC (permalink / raw) To: linux-kernel Hi, When compiling 2.6.15-rc6 or 2.6.14.4 on my sparc I get the following error: local symbol 0: discarded in section `.exit.text' from drivers/built-in.o [*] After calling scripts/reference_discarded.pl it gives me the following error: Error: ./drivers/net/sungem.o .init.text refers to 0000000000000448 R_SPARC_WDISP30 .exit.text When I disable the Sun GEM driver in the configuration it compiles cleanly (didn't try booting as I need the network working to connect to the server). Let me know if you need more information. I can also provide remote access (ssh) to the server if needed. kind regards Nils Meyer * Last command executed by make: ld -m elf64_sparc -o .tmp_vmlinux1 -T arch/sparc64/kernel/vmlinux.lds arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o init/built-in.o --start-group usr/built-in.o arch/sparc64/kernel/built-in.o arch/sparc64/mm/built-in.o arch/sparc64/math-emu/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/sparc64/prom/lib.a arch/sparc64/lib/lib.a lib/built-in.o arch/sparc64/prom/built-in.o arch/sparc64/lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o --end-group -- n@work Internet Informationssysteme | Nils Meyer <meyer@work.de> n@work.de - http://www.work.de | - Technik tel: 040/238809-0 | fax: 040/238909-29 | Spaldingstr. 160d, 20097 Hamburg ^ permalink raw reply [flat|nested] 3+ messages in thread
* [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit 2005-12-21 12:23 Linking fails on sparc64 with 2.6.15-rc6 and Sun GEM Ethernet driver Nils Meyer @ 2005-12-21 13:25 ` Adrian Bunk 2005-12-22 2:50 ` David S. Miller 0 siblings, 1 reply; 3+ messages in thread From: Adrian Bunk @ 2005-12-21 13:25 UTC (permalink / raw) To: Nils Meyer, Andrew Morton, David S. Miller, Linus Torvalds Cc: linux-kernel, jgarzik, netdev On Wed, Dec 21, 2005 at 01:23:18PM +0100, Nils Meyer wrote: > Hi, Hi Nils, > When compiling 2.6.15-rc6 or 2.6.14.4 on my sparc I get the following error: > > local symbol 0: discarded in section `.exit.text' from drivers/built-in.o [*] > > After calling scripts/reference_discarded.pl it gives me the following error: > > Error: ./drivers/net/sungem.o .init.text refers to 0000000000000448 > R_SPARC_WDISP30 .exit.text >... thanks for this report. The untested patch below should fix this bug (I'm assuming your .config hasn't set CONFIG_HOTPLUG). It's a real problem that these bugs have become runtime errors in kernel 2.6 on i386 instead of link errors as they were in kernel 2.4 on i386 (and are still in kernel kernel 2.6 on some other architectures like sparc64) resulting in fewer people noticing them. :-( > kind regards > Nils Meyer cu Adrian <-- snip --> gem_remove_one() is called from the __devinit gem_init_one(). Therefore, gem_remove_one() mustn't be __devexit. Signed-off-by: Adrian Bunk <bunk@stusta.de> --- linux-2.6.15-rc6/drivers/net/sungem.c.old 2005-12-21 14:02:51.000000000 +0100 +++ linux-2.6.15-rc6/drivers/net/sungem.c 2005-12-21 14:03:37.000000000 +0100 @@ -2907,7 +2907,7 @@ return 0; } -static void __devexit gem_remove_one(struct pci_dev *pdev) +static void gem_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); @@ -3181,7 +3181,7 @@ .name = GEM_MODULE_NAME, .id_table = gem_pci_tbl, .probe = gem_init_one, - .remove = __devexit_p(gem_remove_one), + .remove = gem_remove_one, #ifdef CONFIG_PM .suspend = gem_suspend, .resume = gem_resume, ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit 2005-12-21 13:25 ` [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit Adrian Bunk @ 2005-12-22 2:50 ` David S. Miller 0 siblings, 0 replies; 3+ messages in thread From: David S. Miller @ 2005-12-22 2:50 UTC (permalink / raw) To: bunk; +Cc: meyer, akpm, torvalds, linux-kernel, jgarzik, netdev From: Adrian Bunk <bunk@stusta.de> Date: Wed, 21 Dec 2005 14:25:43 +0100 > gem_remove_one() is called from the __devinit gem_init_one(). > > Therefore, gem_remove_one() mustn't be __devexit. > > Signed-off-by: Adrian Bunk <bunk@stusta.de> Looks good, applied, thanks Adrian. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-22 2:50 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-12-21 12:23 Linking fails on sparc64 with 2.6.15-rc6 and Sun GEM Ethernet driver Nils Meyer 2005-12-21 13:25 ` [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit Adrian Bunk 2005-12-22 2:50 ` David S. Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).