Re: linux-next: build failure after merge of the final tree
From: Andrew Morton
Date: Thu Mar 24 2011 - 00:18:03 EST
On Thu, 24 Mar 2011 14:30:19 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
>
> lib/lib.a(show_mem.o): In function `show_mem':
> show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
> arch/sparc/mm/built-in.o:(.text+0xd70): first defined here
I discovered this on ia64 today.
> This has been reported elsewhere, caused by commit ddd588b5dd55 ("oom:
> suppress nodes that are not allowed from meminfo on oom kill").
>
Yeah, this is tricky. The addition of the symbol __show_mem caused the
linker to newly take lib/show_mem.o out of lib/lib.a, whereas
previously that object file would have been omitted from the build
altogether. Even though we compile it!
Making show_mem() __weak would "fix" it, but it's still wrong. Given
that architectures can implement private versions of show_mem(), the
patch was wrong to call the generic version (renamed to __show_mem) at
all.
So... a suitable fix would be to remove __show_mem and to add the
extra arg to show_mem() itself then fix up all callers and to fix up
all implementations to honour "filter".
Meanwhile, ddd588b5dd55f143203799 reverts cleanly and I'd suggest we do
that.
The dependence on linker .a handling is just gross and we should clean
that up. CONFIG_ARCH_HAS_SHOW_MEM or something.
--
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/