From 2de47969c61b6dcbee10950fda4131af29267ff7 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Wed, 14 Jan 2004 01:47:05 -0500 Subject: [PATCH] [PATCH] Re: Building sym 2.1.18f on linux/alpha On Tue, Jan 13, 2004 at 06:02:08PM +0300, Sergey Tikhonov wrote: > The final kernel could not pass linking stage with 2.1.18f version > (included into 2.6.1 kernel patch). > The linker complains that : > drivers/built-in.o(.init.text+0x8cec): In function 'sym2_probe': > : undfined reference to 'local symbols in discarded section .exit.text' > > I compared arch/alpha/kernel/vmlinux.lds.S with one from the i386 tree. > The '.exit.text' and '.exit.data' > sections were moved out of DISCARD attributes in the i386 version. I did > the same with alpha version > and it helped. Thanks for this report; you uncovered a real bug. Actually two real bugs; one is that parisc is not discarding the .init.text and .exit.text sections (so I didn't notice this bug) and the other is that sym_detach is marked __devexit, yet called from a __devinit function. --- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 70b9cb911aef0..ced9f511c0e12 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -2177,7 +2177,7 @@ sym53c8xx_pci_init(struct pci_dev *pdev, struct sym_device *device) * Detach the host. * We have to free resources and halt the NCR chip. */ -static int __devexit sym_detach(struct sym_hcb *np) +static int sym_detach(struct sym_hcb *np) { printk("%s: detaching ...\n", sym_name(np)); -- 2.53.0