2002-08-02 13:25:46

by jeff millar

[permalink] [raw]
Subject: What does this error mean? "local symbols in discarded section .text.exit"

I need some help debugging this kernel build problem.

Here's the tail of my kernel build.

ld -m elf_i386 -r -o init.o main.o version.o do_mounts.o
make[1]: Leaving directory `/usr/src/v2.5.30/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/v2.5.30/arch/i386/lib/lib.a lib/lib.a /usr/
src/v2.5.30/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+0x80f4): undefined reference to `local symbols in
discarded section .te
xt.exit'
make: *** [vmlinux] Error 1


2002-08-02 13:49:28

by Jose Luis Domingo Lopez

[permalink] [raw]
Subject: Re: What does this error mean? "local symbols in discarded section .text.exit"

On Friday, 02 August 2002, at 09:29:09 -0400,
jeff millar wrote:

> I need some help debugging this kernel build problem.
>
> drivers/built-in.o(.data+0x80f4): undefined reference to `local symbols in
> discarded section .te
> xt.exit'
> make: *** [vmlinux] Error 1
>
A know problem with some combinations of binutils and kernel sources. As
Debian bintuils package says:

x You may experience problems linking older (and some newer) kernels with x
x this version of binutils. This is not because of a bug in the linker, x
x but rather a bug in the kernel source. This is being worked out and x
x fixed by the upstream kernel group in newer kernels, but not all of the x
x problems may have been fixed at this time. Older kernel versions will x
x almost always exhibit the problem, however, and no attempts are being x
x made to fix those that we know of. x
x x
x There are a few work-arounds, but the most reliable is to edit the x
x linker script for your architecture (e.g. arch/i386/vmlinux.lds) and x
x remove the '*(.text.exit)' entry from the 'DISCARD' line. It will x
x bloat the kernel somewhat, but it should link properly. x

Regards,

--
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Woody (Linux 2.4.19-pre6aa1)

2002-08-02 22:47:13

by jeff millar

[permalink] [raw]
Subject: Re: What does this error mean? "local symbols in discarded section .text.exit"

Jose...

thanks for the reply. This link error happens with 2.5.27-2.5.30. Are you
sure the kernel people are working on this?

jeff

----- Original Message -----
From: "Jose Luis Domingo Lopez" <[email protected]>

> On Friday, 02 August 2002, at 09:29:09 -0400,
> jeff millar wrote:
>
> > I need some help debugging this kernel build problem.
> >
> > drivers/built-in.o(.data+0x80f4): undefined reference to `local symbols
in
> > discarded section .te
> > xt.exit'
> > make: *** [vmlinux] Error 1
> >
> A know problem with some combinations of binutils and kernel sources. As
> Debian bintuils package says:
>
> x You may experience problems linking older (and some newer) kernels with
x
> x this version of binutils. This is not because of a bug in the linker,
x
> x but rather a bug in the kernel source. This is being worked out and
x
> x fixed by the upstream kernel group in newer kernels, but not all of the
x
> x problems may have been fixed at this time. Older kernel versions will
x
> x almost always exhibit the problem, however, and no attempts are being
x
> x made to fix those that we know of.
x


2002-08-02 23:01:03

by Thunder from the hill

[permalink] [raw]
Subject: Re: What does this error mean? "local symbols in discarded section .text.exit"

Hi,

On Fri, 2 Aug 2002, jeff millar wrote:
> thanks for the reply. This link error happens with 2.5.27-2.5.30. Are you
> sure the kernel people are working on this?

Well, it doesn't seem so.

http://marc.theaimsgroup.com/?l=linux-kernel&m=102798967514023&w=2
http://marc.theaimsgroup.com/?l=linux-kernel&m=102799199615357&w=2

The response seems to me like "Well, I don't care as long as the latest
(not working on some arches) gcc does..."

Thunder
--
.-../../-./..-/-..- .-./..-/.-.././.../.-.-.-