2003-09-25 10:15:51

by Adrian Bunk

[permalink] [raw]
Subject: 2.6 eicon/ and hardware/eicon/ drivers using the same symbols

I got the link error below in 2.6.0-test5-mm4 (but it doesn't seem to be
specific to -mm).

It seems some drivers under eicon/ and hardware/eicon/ use the same
symbols. Either some symbols should be renamed or Kconfig dependencies
should ensure that you can't build two such drivers statically into the
kernel at the same time.

cu
Adrian

<-- snip -->

LD drivers/isdn/built-in.o
drivers/isdn/sc/built-in.o(.bss+0x0): multiple definition of `adapter'
drivers/isdn/hardware/built-in.o(.data+0x1134): first defined here
ld: Warning: size of symbol `adapter' changed from 4 in
drivers/isdn/hardware/built-in.o to 16 in drivers/isdn/sc/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x97ac): In function `mem_inw':
: multiple definition of `mem_inw'
drivers/isdn/hardware/built-in.o(.text+0x10240): first defined here
ld: Warning: size of symbol `mem_inw' changed from 26 in
drivers/isdn/hardware/built-in.o to 66 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9944): In function
`mem_out_buffer':
: multiple definition of `mem_out_buffer'
drivers/isdn/hardware/built-in.o(.text+0x10378): first defined here
ld: Warning: size of symbol `mem_out_buffer' changed from 48 in
drivers/isdn/hardware/built-in.o to 74 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9690): In function
`DIVA_DIDD_Read':
: multiple definition of `DIVA_DIDD_Read'
drivers/isdn/hardware/built-in.o(.text+0xd454): first defined here
ld: Warning: size of symbol `DIVA_DIDD_Read' changed from 17 in
drivers/isdn/hardware/built-in.o to 93 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9a78): In function `io_in_buffer':
: multiple definition of `io_in_buffer'
drivers/isdn/hardware/built-in.o(.text+0x1041c): first defined here
ld: Warning: size of symbol `io_in_buffer' changed from 105 in
drivers/isdn/hardware/built-in.o to 73 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9a34): In function `io_inw':
: multiple definition of `io_inw'
drivers/isdn/hardware/built-in.o(.text+0x103f0): first defined here
ld: Warning: size of symbol `io_inw' changed from 44 in
drivers/isdn/hardware/built-in.o to 65 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9768): In function `mem_in':
: multiple definition of `mem_in'
drivers/isdn/hardware/built-in.o(.text+0x10224): first defined here
ld: Warning: size of symbol `mem_in' changed from 25 in
drivers/isdn/hardware/built-in.o to 66 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9c0c): In function `io_inc':
: multiple definition of `io_inc'
drivers/isdn/hardware/built-in.o(.text+0x105b8): first defined here
ld: Warning: size of symbol `io_inc' changed from 87 in
drivers/isdn/hardware/built-in.o to 83 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9b7c): In function `io_outw':
: multiple definition of `io_outw'
drivers/isdn/hardware/built-in.o(.text+0x1051c): first defined here
ld: Warning: size of symbol `io_outw' changed from 47 in
drivers/isdn/hardware/built-in.o to 68 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9990): In function `mem_inc':
: multiple definition of `mem_inc'
drivers/isdn/hardware/built-in.o(.text+0x103a8): first defined here
ld: Warning: size of symbol `mem_inc' changed from 25 in
drivers/isdn/hardware/built-in.o to 80 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9bc0): In function
`io_out_buffer':
: multiple definition of `io_out_buffer'
drivers/isdn/hardware/built-in.o(.text+0x1054c): first defined here
ld: Warning: size of symbol `io_out_buffer' changed from 105 in
drivers/isdn/hardware/built-in.o to 73 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x983c): In function
`mem_look_ahead':
: multiple definition of `mem_look_ahead'
drivers/isdn/hardware/built-in.o(.text+0x102c4): first defined here
ld: Warning: size of symbol `mem_look_ahead' changed from 74 in
drivers/isdn/hardware/built-in.o to 118 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x99e0): In function `io_in':
: multiple definition of `io_in'
drivers/isdn/hardware/built-in.o(.text+0x103c4): first defined here
ld: Warning: size of symbol `io_in' changed from 44 in
drivers/isdn/hardware/built-in.o to 81 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x98fc): In function `mem_outw':
: multiple definition of `mem_outw'
dridn/hardware/built-in.o(.text+0x10328): first defined here
ld: Warning: size of symbol `mem_outw' changed from 25 in
drivers/isdn/hardware/built-in.o to 69 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x98b4): In function `mem_out':
: multiple definition of `mem_out'
drivers/isdn/hardware/built-in.o(.text+0x10310): first defined here
ld: Warning: size of symbol `mem_out' changed from 24 in
drivers/isdn/hardware/built-in.o to 69 in drivers/isdn/eicon/built-in.o
drivers/isdn/eicon/built-in.o(.text+0x9b38): In function `io_out':
: multiple definition of `io_out'
drivers/isdn/hardware/built-in.o(.text+0x104ec): first defined here
ld: Warning: size of symbol `io_out' changed from 47 in
drivers/isdn/hardware/built-in.o to 68 in drivers/isdn/eicon/built-in.o
...
make[2]: *** [drivers/isdn/built-in.o] Error 1

<-- snip -->


2003-09-25 11:33:58

by Armin Schindler

[permalink] [raw]
Subject: [PATCH] Re: 2.6 eicon/ and hardware/eicon/ drivers using the same symbols

On Thu, 25 Sep 2003, Adrian Bunk wrote:
> I got the link error below in 2.6.0-test5-mm4 (but it doesn't seem to be
> specific to -mm).
>
> It seems some drivers under eicon/ and hardware/eicon/ use the same
> symbols. Either some symbols should be renamed or Kconfig dependencies
> should ensure that you can't build two such drivers statically into the
> kernel at the same time.

The legacy eicon driver in drivers/isdn/eicon is the old one and will be
removed as soon as all features went to the new driver.
Anyway this old driver was never meant to be non-module.

This patch should do it.

Armin



--- linux-2.5/drivers/isdn/eicon/Kconfig.orig Thu Sep 25 13:28:07 2003
+++ linux-2.5/drivers/isdn/eicon/Kconfig Thu Sep 25 13:27:01 2003
@@ -13,7 +13,7 @@
choice
prompt "Eicon active card support"
optional
- depends on ISDN_DRV_EICON && ISDN
+ depends on ISDN_DRV_EICON && ISDN && m

config ISDN_DRV_EICON_DIVAS
tristate "Eicon driver"

2003-09-25 11:38:43

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] Re: 2.6 eicon/ and hardware/eicon/ drivers using the same symbols

On Thu, Sep 25, 2003 at 01:33:53PM +0200, Armin Schindler wrote:
> The legacy eicon driver in drivers/isdn/eicon is the old one and will be
> removed as soon as all features went to the new driver.
> Anyway this old driver was never meant to be non-module.

What about just killing it off? If users really want the old one
on 2.6 you can put up a tarball for them somewhere.

The driver is so horrinly ugly that it better goes away sooner than
later..

2003-09-25 11:52:43

by Armin Schindler

[permalink] [raw]
Subject: Re: [PATCH] Re: 2.6 eicon/ and hardware/eicon/ drivers using the same symbols

On Thu, 25 Sep 2003, Christoph Hellwig wrote:
> On Thu, Sep 25, 2003 at 01:33:53PM +0200, Armin Schindler wrote:
> > The legacy eicon driver in drivers/isdn/eicon is the old one and will be
> > removed as soon as all features went to the new driver.
> > Anyway this old driver was never meant to be non-module.
>
> What about just killing it off? If users really want the old one
> on 2.6 you can put up a tarball for them somewhere.
>
> The driver is so horrinly ugly that it better goes away sooner than
> later..

Oh thank you! Okay, it's old, too old.

It's not just "the old one", this driver still supports more than 4 ISDN
cards, which are not yet supported by the other driver.

But maybe you are right...

Armin


2003-09-26 22:51:13

by Adrian Bunk

[permalink] [raw]
Subject: [PATCH] let ISDN_DRV_SC depend on m

On Thu, Sep 25, 2003 at 01:33:53PM +0200, Armin Schindler wrote:
> On Thu, 25 Sep 2003, Adrian Bunk wrote:
> > I got the link error below in 2.6.0-test5-mm4 (but it doesn't seem to be
> > specific to -mm).
> >
> > It seems some drivers under eicon/ and hardware/eicon/ use the same
> > symbols. Either some symbols should be renamed or Kconfig dependencies
> > should ensure that you can't build two such drivers statically into the
> > kernel at the same time.
>
> The legacy eicon driver in drivers/isdn/eicon is the old one and will be
> removed as soon as all features went to the new driver.
> Anyway this old driver was never meant to be non-module.
>
> This patch should do it.

Yes, thanks, this works. The similar patch for ISDN_DRV_SC below is
needed, too.

> Armin

cu
Adrian

--- linux-2.6.0-test5-mm4-no-smp-2.95/drivers/isdn/sc/Kconfig.old 2003-09-25 19:21:07.000000000 +0200
+++ linux-2.6.0-test5-mm4-no-smp-2.95/drivers/isdn/sc/Kconfig 2003-09-25 19:21:54.000000000 +0200
@@ -3,7 +3,7 @@
#
config ISDN_DRV_SC
tristate "Spellcaster support"
- depends on ISDN && ISA
+ depends on ISDN && ISA && m
help
This enables support for the Spellcaster BRI ISDN boards. This
driver currently builds only in a modularized version ( = code which