All of lore.kernel.org
 help / color / mirror / Atom feed
* Compiling 2.5.32
@ 2002-08-29 20:09 Michael Obster
  2002-08-29 20:23 ` Dave Hansen
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Obster @ 2002-08-29 20:09 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]

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__||_|\\
------------------------------------------------------------------

[-- Attachment #2: config --]
[-- Type: application/x-java-vm, Size: 23519 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compiling 2.5.32
  2002-08-29 20:09 Compiling 2.5.32 Michael Obster
@ 2002-08-29 20:23 ` Dave Hansen
  2002-08-29 23:20   ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Hansen @ 2002-08-29 20:23 UTC (permalink / raw)
  To: Michael Obster; +Cc: linux-kernel

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/cset@1.485.7.2

So, find and fix the driver, use hotplug, or get an older binutils.
-- 
Dave Hansen
haveblue@us.ibm.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compiling 2.5.32
  2002-08-29 20:23 ` Dave Hansen
@ 2002-08-29 23:20   ` Adrian Bunk
  2002-08-29 23:24     ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2002-08-29 23:20 UTC (permalink / raw)
  To: Dave Hansen; +Cc: Michael Obster, linux-kernel, Jeff Garzik

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/cset@1.485.7.2
>
> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compiling 2.5.32
  2002-08-29 23:20   ` Adrian Bunk
@ 2002-08-29 23:24     ` Jeff Garzik
  2002-08-29 23:42       ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2002-08-29 23:24 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Dave Hansen, Michael Obster, linux-kernel

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compiling 2.5.32
  2002-08-29 23:24     ` Jeff Garzik
@ 2002-08-29 23:42       ` Adrian Bunk
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2002-08-29 23:42 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Dave Hansen, Michael Obster, linux-kernel

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-08-29 23:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-29 20:09 Compiling 2.5.32 Michael Obster
2002-08-29 20:23 ` Dave Hansen
2002-08-29 23:20   ` Adrian Bunk
2002-08-29 23:24     ` Jeff Garzik
2002-08-29 23:42       ` Adrian Bunk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.