From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: Link breakage on all architectures which implement their own show_mem Date: Fri, 25 Mar 2011 21:55:00 +1100 Message-ID: <1301050500.2402.487.camel@pasglop> References: <1300898506.15899.24.camel@mulgrave.site> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from gate.crashing.org ([63.228.1.57]:36407 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755428Ab1CYKzI (ORCPT ); Fri, 25 Mar 2011 06:55:08 -0400 In-Reply-To: <1300898506.15899.24.camel@mulgrave.site> Sender: linux-arch-owner@vger.kernel.org List-ID: To: James Bottomley Cc: David Rientjes , linux-arch@vger.kernel.org On Wed, 2011-03-23 at 11:41 -0500, James Bottomley wrote: > oom: suppress nodes that are not allowed from meminfo on oom kill > > Is the cause. What it does is introduce a new __show_mem() which is > required by files in mm/, so the object containing it: show_mem.o gets > pulled in all the time in the link and that gives every architecture > that implements their own show_mem() a link failure because of the > double definition. Library linking works at the file level, not at > the > function level. To work, you have to put these functions in separate Can't this be fixed by making show_mem() weak ? Or am I missing something ? Cheers, Ben.