* 2.5: smc9194.c + smc-ircc.c: multiple definition of `smc_init'
@ 2002-07-09 10:09 Adrian Bunk
2002-07-09 20:32 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2002-07-09 10:09 UTC (permalink / raw)
To: akpm, jgarzik, linux-kernel
I got the following compile error in 2.5.25-dj1 (most likely the problem
is also present in 2.5.25):
<-- snip -->
...
ld -m elf_i386 -r -o built-in.o slhc.o e100/built-in.o
e1000/built-in.o plip.o rrunner.o sunhme.o sungem.o dgrs.o rcpci.o 3c59x.o
ne2k-pci.o 8390.o pcnet32.o mii.o eepro100.o tlan.o epic100.o sis900.o
yellowfin.o acenic.o natsemi.o ns83820.o fealnx.o tg3.o sk98lin/built-in.o
skfp/built-in.o via-rhine.o starfire.o aironet4500_core.o
aironet4500_card.o aironet4500_proc.o sundance.o hamachi.o Space.o setup.o
net_init.o loopback.o ethertap.o sb1000.o shaper.o hp100.o smc9194.o
3c503.o ne.o ne2.o hp.o hp-plus.o smc-ultra.o smc-mca.o smc-ultra32.o
e2100.o es3210.o lne390.o ne3210.o ppp_generic.o ppp_async.o ppp_synctty.o
ppp_deflate.o bsd_comp.o pppox.o pppoe.o slip.o strip.o dummy.o bonding.o
de600.o de620.o lance.o defxx.o at1700.o 3c501.o 3c507.o 3c523.o sk_mca.o
ibmlana.o 3c527.o 3c509.o 3c515.o eexpress.o eepro.o 8139cp.o 8139too.o
arlan.o arlan-proc.o depca.o ewrk3.o atp.o ni5010.o ni52.o ni65.o 3c505.o
ac3200.o 82596.o lp486e.o eth16i.o eql.o cs89x0.o tun.o dl2k.o
fc/built-in.o appletalk/built-in.o tokenring/built-in.o wan/built-in.o
arcnet/built-in.o pcmcia/built-in.o wireless/built-in.o tulip/built-in.o
hamradio/built-in.o irda/built-in.o
irda/built-in.o: In function `smc_init':
irda/built-in.o(.text.init+0x1624): multiple definition of `smc_init'
smc9194.o(.text.init+0x0): first defined here
ld: Warning: size of symbol `smc_init' changed from 101 to 10 in
irda/built-in.o
make[2]: *** [built-in.o] Error 1
make[2]: Leaving directory
`/home/bunk/linux/kernel-2.5/linux-2.5.25-full/drivers/net'
<-- snip -->
The following shows the files that cause this problem:
<-- snip -->
drivers/net$ grep -r smc_init *
Space.c:extern int smc_init( struct net_device * );
Space.c: {smc_init, 0},
Binary file Space.o matches
irda/smc-ircc.c:int __init smc_init(void)
irda/smc-ircc.c:module_init(smc_init);
Binary file irda/smc-ircc.o matches
Binary file irda/built-in.o matches
smc9194.c:int smc_init(struct net_device *dev);
smc9194.c: | smc_init( struct net_device * dev )
smc9194.c:int __init smc_init(struct net_device *dev)
smc9194.c: devSMC9194.init = smc_init;
Binary file smc9194.o matches
<-- snip -->
It seems the solution is to rename one of the two?
cu
Adrian
--
You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
Alan Cox
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: 2.5: smc9194.c + smc-ircc.c: multiple definition of `smc_init'
2002-07-09 10:09 2.5: smc9194.c + smc-ircc.c: multiple definition of `smc_init' Adrian Bunk
@ 2002-07-09 20:32 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2002-07-09 20:32 UTC (permalink / raw)
To: Adrian Bunk; +Cc: jgarzik, linux-kernel, Dave Jones
Adrian Bunk wrote:
>
> ...
> irda/built-in.o: In function `smc_init':
> irda/built-in.o(.text.init+0x1624): multiple definition of `smc_init'
> smc9194.o(.text.init+0x0): first defined here
> ld: Warning: size of symbol `smc_init' changed from 101 to 10 in
> irda/built-in.o
yup. There's an smc_init() in drivers/net/irda/smc-ircc.c and
another in drivers/net/smc9194.c. The latter cannot be made static
because drivers/net/Space.c refers to it. But we can make the irda
one static.
And yes, 2.5.25 needs this.
--- 2.5.25/drivers/net/irda/smc-ircc.c~smc-init Tue Jul 9 13:28:51 2002
+++ 2.5.25-akpm/drivers/net/irda/smc-ircc.c Tue Jul 9 13:28:53 2002
@@ -1203,7 +1203,7 @@ static int __exit ircc_close(struct ircc
return 0;
}
-int __init smc_init(void)
+static int __init smc_init(void)
{
return ircc_init();
}
-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-09 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-09 10:09 2.5: smc9194.c + smc-ircc.c: multiple definition of `smc_init' Adrian Bunk
2002-07-09 20:32 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox