Compiling 2.5.32
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 stextarch/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__||_|\\
------------------------------------------------------------------
Quoted 3 lines · Michael Obster
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.
Signature · 2 lines
Dave Hansen [email protected]
Quoted 14 lines · Dave Hansen
Quoted 7 lines · Michael Obster
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 symbolsFrom what I understand this happens when these conditions are met:
1. You use a recent version of binutils (Debian has one)
2.CONFIG_HOTPLUGis not set
3. You compile a driver that doesn't properly use__devexit_pmacro
Quoted 4 lines
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:
net/tulip/de2104x.c renamed from net/tulip/de2104x.c.old +2 -0
@@ -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
Signature · 3 lines
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
Quoted 9 lines · Adrian Bunk
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:
net/tulip/de2104x.c line 2224
Quoted 9 lines
net/tulip/de2104x.c renamed from net/tulip/de2104x.c.old +2
-0@@ -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
Quoted 22 lines · Jeff Garzik
Quoted 9 lines
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:
net/tulip/de2104x.c line 2224
Quoted 9 lines
net/tulip/de2104x.c renamed from net/tulip/de2104x.c.old +2
-0@@ -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.
Quoted 5 lines
Currently in 2.5.x, you should be able to replace that #ifdef with
__devexit_p-- without changing thede_remove_oneprototype. I updated the definition of__devexit_pin 2.5.30 or so.From
include/linux/init.hin 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...
Quoted 1 line
Jeff
cu
Adrian
Signature · 3 lines
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