Re: 2.6.23-rc8-mm1 -- powerpc link failure

From: Sam Ravnborg
Date: Thu Sep 27 2007 - 15:30:12 EST


On Thu, Sep 27, 2007 at 10:13:42AM -0700, Andrew Morton wrote:
> On Thu, 27 Sep 2007 14:13:21 +0200 (CEST) Jiri Kosina <jkosina@xxxxxxx> wrote:
>
> > On Thu, 27 Sep 2007, Andy Whitcroft wrote:
> >
> > > Ok, this problem seems to still persist in 2.6.23-rc8-mm2. It seems we
> > > have three options from here:
> > > 1) update the compiler support list to exclude these compilers, or
> > > 2) back this change out, or
> > > 3) switch to the version not using __weak.
> > > The latter seems to be the least intrusive change. As no-one closer to
> > > the problem is stepping up to make the decision I will propose we go
> > > with the third option here.
> >
> > Andrew,
> >
> > if you agree with Andy that we should support compilers that don't work
> > with __weak, please drop i386-and-x86_64-randomize-brk.patch and replace
> > it with the one below instead (this has been already posted at
> > http://lkml.org/lkml/2007/8/31/113). Thanks.
> >
>
> We have quite a few instances of __weak in there. What is special about
> this one?

The bug we trigger is an ld bug - not a compiler bug.
What happens is that we have the same function defined weak twice.
In fs/ we include binfmt_elf.o in the build because
CONFIG_BINFMT_ELF is set.
And in arch/powerpc/kernel/binfmt_elf32.c:
we do an: #include "../../../fs/binfmt_elf.c"

Without actually trying it out I assume we trigger the ld bug
because we define the same weak function twice.

And this is a non-typical situation.

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