2.5.49-ac1 - more info on make error

2.5.49-ac1 - more info on make error

Post by Randy.Dunla » Tue, 03 Dec 2002 19:20:07



| Knowing that modules are still broken, I changed all modules to be
| built-in and dropped all support for modules and retried the compile. I
| have disabled all but the features I really want to test on the new
| kernel, so I will not be reducing the features any more.

I haven't seen any replies or fixes for this.  Have you?

drivers/built-in.o(.data+0x31e14): undefined reference to `local symbols
in discarded section .exit.text'

Please visit http://www.kernelnewbies.org/scripts/ and download
the 'reference-discarded.pl' script, run it, and let us know where the
problem is.

--
~Randy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.49-ac1 - more info on make error

Post by Adrian Bun » Tue, 03 Dec 2002 20:30:10



>...

Content-Description: config

Quote:>...
> 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

        .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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.49-ac1 - more info on make error

Post by Jeff Garzi » Tue, 03 Dec 2002 20:40:07




> ./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):

As noted in the #warning, solution 3 (__exit_p) is the preferred one ;-)

Bill Irwin wrote up the patch to fix things The Right Way(tm).  The
attached patch from Bill should eliminate all compile errors and warnings.

        Jeff

[ patch 2K ]

This patch fixes tulip up by doing the following things:
(1) add __exit_p() to <linux/init.h>
(2) add the unused attributed to __exit routines for non-modules
(3) use __exit_p() to refer to de_remove_one()
(4) remove redundant timer initialization preceding variable initialization

 drivers/net/tulip/de2104x.c |    4 +---
 include/linux/init.h        |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)

--- linux-2.5.49-mm1/include/linux/init.h       Fri Nov 22 13:40:14 2002

    discard it in modules) */
 #define __init         __attribute__ ((__section__ (".init.text")))
 #define __initdata     __attribute__ ((__section__ (".init.data")))
-#define __exit         __attribute__ ((__section__(".exit.text")))
 #define __exitdata     __attribute__ ((__section__(".exit.data")))
 #define __exit_call    __attribute__ ((unused,__section__ (".exitcall.exit")))

+#ifdef MODULE
+#define __exit         __attribute__ ((__section__(".exit.text")))
+#else
+#define __exit         __attribute__ ((unused,__section__(".exit.text")))
+#endif
+
 /* For assembly routines */
 #define __INIT         .section        ".init.text","ax"

 #define __devexit_p(x) x
 #else
 #define __devexit_p(x) NULL
+#endif
+
+#ifdef MODULE
+#define __exit_p(x) x
+#else
+#define __exit_p(x) NULL
 #endif

 #endif /* _LINUX_INIT_H */
--- linux-2.5.49-mm1/drivers/net/tulip/de2104x.c        Fri Nov 22 13:40:56 2002

        dev->watchdog_timeo = TX_TIMEOUT;

        dev->irq = pdev->irq;
-       init_timer(&de->media_timer);

        de = dev->priv;

        .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),
+       .remove         = __exit_p(de_remove_one),
 #ifdef CONFIG_PM
        .suspend        = de_suspend,
        .resume         = de_resume,

 
 
 

2.5.49-ac1 - more info on make error

Post by Bill Davidse » Tue, 03 Dec 2002 21:10:18




> | Knowing that modules are still broken, I changed all modules to be
> | built-in and dropped all support for modules and retried the compile. I
> | have disabled all but the features I really want to test on the new
> | kernel, so I will not be reducing the features any more.

> I haven't seen any replies or fixes for this.  Have you?

No. I have pretty much assumed that there is no interest in having this
work. The modules are broken to the point where either the author or
someone who has documentation on how they should work will have to fix
them. Clearly the policy of "if you want your change in the kernel you
have to fix what it breaks" is dead.

Quote:> drivers/built-in.o(.data+0x31e14): undefined reference to `local symbols
> in discarded section .exit.text'

> Please visit http://www.kernelnewbies.org/scripts/ and download
> the 'reference-discarded.pl' script, run it, and let us know where the
> problem is.

I posted that to the list, if it didn't make it for any reason I can't
easily recreate it, the machine has been converted to BSD, the 2.5 work is
on a removable drive which is removed, since we can't make any progress
with it for the moment.

It was the old tulip driver which had the problem, de21{something}x.c as I
recall. Without a doc on what causes that I gave up trying to fix it by
comparing to other modules.

Thanks for asking.

--

  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.49-ac1 - more info on make error

Post by Randy.Dunla » Tue, 03 Dec 2002 21:20:05



|

| >
| > | Knowing that modules are still broken, I changed all modules to be
| > | built-in and dropped all support for modules and retried the compile. I
| > | have disabled all but the features I really want to test on the new
| > | kernel, so I will not be reducing the features any more.
| >
| > I haven't seen any replies or fixes for this.  Have you?
|
| No. I have pretty much assumed that there is no interest in having this
| work. The modules are broken to the point where either the author or
| someone who has documentation on how they should work will have to fix
| them. Clearly the policy of "if you want your change in the kernel you
| have to fix what it breaks" is dead.

This is not the borked-modules problem; it's different.

| > drivers/built-in.o(.data+0x31e14): undefined reference to `local symbols
| > in discarded section .exit.text'
| >
| > Please visit http://www.kernelnewbies.org/scripts/ and download
| > the 'reference-discarded.pl' script, run it, and let us know where the
| > problem is.
|
| I posted that to the list, if it didn't make it for any reason I can't
| easily recreate it, the machine has been converted to BSD, the 2.5 work is
| on a removable drive which is removed, since we can't make any progress
| with it for the moment.

whatever.  Adrian Bunk & Jeff Garzik have now posted patches for it.

| It was the old tulip driver which had the problem, de21{something}x.c as I
| recall. Without a doc on what causes that I gave up trying to fix it by
| comparing to other modules.

--
~Randy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.49-ac1 - more info on make error

Post by Bill Davidse » Tue, 03 Dec 2002 22:00:25




> | No. I have pretty much assumed that there is no interest in having this
> | work. The modules are broken to the point where either the author or
> | someone who has documentation on how they should work will have to fix
> | them. Clearly the policy of "if you want your change in the kernel you
> | have to fix what it breaks" is dead.

> This is not the borked-modules problem; it's different.

I misread, I thought it came about when changes for module interface were
applied.

Quote:> | I posted that to the list, if it didn't make it for any reason I can't
> | easily recreate it, the machine has been converted to BSD, the 2.5 work is
> | on a removable drive which is removed, since we can't make any progress
> | with it for the moment.

> whatever.  Adrian Bunk & Jeff Garzik have now posted patches for it.

Yes, I've noted my thanks earlier, particularly for some info on the
underlying cause, which will be useful when I see that problem again.

--

  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.49-ac1 - more info on make error

Post by Bill Davidse » Tue, 03 Dec 2002 22:10:12




> >...
> 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:

Huh, not an hour after I said I hadn't heard anything I get two patches
and an explanation of what the base problem is, so I can apply it to any
other similar problems. I assumed that no one else was using this old
stuff.

Note: I have an old tulip card with a BNC and 10baseT connector on a
single card. I had assumed one or the other, but with 2.5 kernels the card
appears as two NICs, with separate io and irq addresses. Since I have to
support thinnet or replace a bunch of devices with network built in, and
cards which support BNC are getting scarce, this looks like a nice
semi-firewall solution.

--

  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.49-ac1 local data...

Since I was given a tool to find this, I'll post it back even though it's
against an obsolete version. Attached in hopes that it will be readable
with long lines and all...

--

  Having the feature freeze for Linux 2.5 on Hallow'een is appropriate,
since using 2.5 kernels includes a lot of things jumping out of dark
corners to scare you.

  ref.log
< 1K Download

2. Octal ADSL Modem

3. 2.5.49-ac1 : include/asm-386/io_apic.h

4. booting problem... Need your help

5. Linux 2.5.49-ac1

6. make: *** No rule to make target 'mrproper'...

7. 2.5.49-ac1 : apic_sis_bug undeclared

8. Xfig?

9. patch: 2.5.49+bk(-ac1,-ac2) missing interrupt.h sound/oss/sb_ess.c

10. 2.5.49 Compilation error

11. cpufreq divide error in 2.5.49

12. 2.5.49: compile problem with allnoconfig (actually show error this time)

13. 2.5.49-mm1 paging request error -> kernel panic