Hi,
can anybody give me hint. I don't think it is a bug, but i don't know
what this error means for me. It is in "make bzImage" and the config is
attached. Symlink asm is on asm-i386 and i added "ln -s
/usr/src/linux/include/asm-generic /usr/include/asm-generic". Build
environment is Athlon, Kernel 2.4.18, gcc 2.95.3
---------------error in-------------------
Generating build number
make[1]: Entering directory `/usr/src/linux-2.5.32/init'
Generating /usr/src/linux-2.5.32/include/linux/compile.h (updated)
gcc -Wp,-MD,./.version.o.d -D__KERNEL__
-I/usr/src/linux-2.5.32/include -Wall -Wstrict-prototypes -Wno-trigraphs
-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -nostdinc
-iwithprefix include -DKBUILD_BASENAME=version -c -o version.o
version.c
ld -m elf_i386 -r -o init.o main.o version.o do_mounts.o
make[1]: Leaving directory `/usr/src/linux-2.5.32/init'
ld -m elf_i386 -T arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/init.o
--start-group arch/i386/kernel/kernel.o arch/i386/mm/mm.o
kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o security/built-in.o
/usr/src/linux-2.5.32/arch/i386/lib/lib.a lib/lib.a
/usr/src/linux-2.5.32/arch/i386/lib/lib.a drivers/built-in.o
sound/sound.o arch/i386/pci/pci.o net/network.o --end-group -o vmlinux
drivers/built-in.o(.data+0x2fab4): undefined reference to `local symbols
in discarded section .text.exit'
make: *** [vmlinux] Error 1
---------------error out------------------
Kind Regards,
Michael Obster
---
Do you want to rock? ___ ___ ___ _ _
http://www.rocklinux.org/ | _ || _ || __|| |//
||_|||| |||| | /
| _|||_||||__ | \
||\\ |_LINUX__||_|\\
------------------------------------------------------------------
Michael Obster wrote:
> can anybody give me hint. I don't think it is a bug, but i don't know
> what this error means for me. It is in "make bzImage" and the config is
> attached. Symlink asm is on asm-i386 and i added "ln -s
> /usr/src/linux/include/asm-generic /usr/include/asm-generic". Build
> environment is Athlon, Kernel 2.4.18, gcc 2.95.3
> <snip>
> drivers/built-in.o(.data+0x2fab4): undefined reference to `local symbols
From what I understand this happens when these conditions are met:
1. You use a recent version of binutils (Debian has one)
2. CONFIG_HOTPLUG is not set
3. You compile a driver that doesn't properly use __devexit_p macro
I fixed this in the IPS driver:
http://linus.bkbits.net:8080/linux-2.5/user=haveblue/[email protected]
So, find and fix the driver, use hotplug, or get an older binutils.
--
Dave Hansen
[email protected]
On Thu, 29 Aug 2002, Dave Hansen wrote:
> Michael Obster wrote:
> > can anybody give me hint. I don't think it is a bug, but i don't know
> > what this error means for me. It is in "make bzImage" and the config is
> > attached. Symlink asm is on asm-i386 and i added "ln -s
> > /usr/src/linux/include/asm-generic /usr/include/asm-generic". Build
> > environment is Athlon, Kernel 2.4.18, gcc 2.95.3
> > <snip>
> > drivers/built-in.o(.data+0x2fab4): undefined reference to `local symbols
>
> From what I understand this happens when these conditions are met:
> 1. You use a recent version of binutils (Debian has one)
> 2. CONFIG_HOTPLUG is not set
> 3. You compile a driver that doesn't properly use __devexit_p macro
>
> I fixed this in the IPS driver:
> http://linus.bkbits.net:8080/linux-2.5/user=haveblue/[email protected]
>
> So, find and fix the driver, use hotplug, or get an older binutils.
Michael's problem is drivers/net/tulip/de2104x.c and this problem is known
since several months.
There are two possible solutions:
1. make the driver hot-pluggable
2. #ifdef the .remove away
Jeff Garzik doesn't want 1. until "someone actually tells me they are
trying to hot-plug such a card" and he didn't apply the following patch to
#ifdef the .remove away if the driver is compiled statically into the
kernel:
--- drivers/net/tulip/de2104x.c.old 2002-08-30 01:06:09.000000000 +0200
+++ drivers/net/tulip/de2104x.c 2002-08-30 01:06:45.000000000 +0200
@@ -2216,7 +2216,9 @@
.name = DRV_NAME,
.id_table = de_pci_tbl,
.probe = de_init_one,
+#ifdef MODULE
.remove = de_remove_one,
+#endif
#ifdef CONFIG_PM
.suspend = de_suspend,
.resume = de_resume,
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
Adrian Bunk wrote:
> Jeff Garzik doesn't want 1. until "someone actually tells me they are
> trying to hot-plug such a card" and he didn't apply the following patch to
> #ifdef the .remove away if the driver is compiled statically into the
> kernel:
>
>
> --- drivers/net/tulip/de2104x.c.old 2002-08-30 01:06:09.000000000 +0200
> +++ drivers/net/tulip/de2104x.c 2002-08-30 01:06:45.000000000 +0200
> @@ -2216,7 +2216,9 @@
> .name = DRV_NAME,
> .id_table = de_pci_tbl,
> .probe = de_init_one,
> +#ifdef MODULE
> .remove = de_remove_one,
> +#endif
> #ifdef CONFIG_PM
> .suspend = de_suspend,
> .resume = de_resume,
You missed my recent message, I think.
Currently in 2.5.x, you should be able to replace that #ifdef with
__devexit_p -- without changing the de_remove_one prototype. I updated
the definition of __devexit_p in 2.5.30 or so.
Jeff
On Thu, 29 Aug 2002, Jeff Garzik wrote:
> > Jeff Garzik doesn't want 1. until "someone actually tells me they are
> > trying to hot-plug such a card" and he didn't apply the following patch to
> > #ifdef the .remove away if the driver is compiled statically into the
> > kernel:
> >
> >
> > --- drivers/net/tulip/de2104x.c.old 2002-08-30 01:06:09.000000000 +0200
> > +++ drivers/net/tulip/de2104x.c 2002-08-30 01:06:45.000000000 +0200
> > @@ -2216,7 +2216,9 @@
> > .name = DRV_NAME,
> > .id_table = de_pci_tbl,
> > .probe = de_init_one,
> > +#ifdef MODULE
> > .remove = de_remove_one,
> > +#endif
> > #ifdef CONFIG_PM
> > .suspend = de_suspend,
> > .resume = de_resume,
>
>
> You missed my recent message, I think.
>
> Currently in 2.5.x, you should be able to replace that #ifdef with
> __devexit_p -- without changing the de_remove_one prototype. I updated
> the definition of __devexit_p in 2.5.30 or so.
>From include/linux/init.h in 2.5.32:
<-- snip -->
...
#if defined(MODULE) || defined(CONFIG_HOTPLUG)
#define __devexit_p(x) x
#else
#define __devexit_p(x) NULL
#endif
...
<-- snip -->
With the .config of Michael a __devexit_p in de2104x.c doesn't help
because CONFIG_HOTPLUG is defined...
> Jeff
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