Re: 2.5: Link errors are shown in the wrong files

Kai Germaschewski (kai-germaschewski@uiowa.edu)
Fri, 10 Jan 2003 15:42:16 -0600 (CST)


On Fri, 10 Jan 2003, Adrian Bunk wrote:

> I'm doing regular compile tests with 2.4 and 2.5 kernels to catch and
> either fix or report compile errors.
>
> Since several revisions 2.5 has the _very_ annoying behavior of showing
> link errors in the wrong files. This makes finding the cause of the
> problems harder.

> drivers/built-in.o(.init.text+0x51901):/home/bunk/linux/kernel-2.5/linux-2.5.55/drivers/atm/lanai.c:
> undefined reference to `_ebss'
> [...]

> I'm using the gcc 2.95 and binutils 2.13.90.0.16 from Debian unstable.

Here I get e.g.

drivers/built-in.o: In function `isdn_audio_put_dle_code':
drivers/built-in.o(.text+0xe2247): undefined reference to `save_flags'
drivers/built-in.o(.text+0xe224c): undefined reference to `cli'
drivers/built-in.o(.text+0xe226f): undefined reference to `restore_flags'

which is actually correct. My ld doesn't output the name of the file the
function was in at all, though. I'm rather sure that you're hitting a
binutils bug, possibly triggered by the use of the ld during the kernel
build, which creates multiple levels of composite objects (ld -r) before
the final link.

Maybe you updated binutils and that's when the problems started?

--Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/