linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
	linux-arch@vger.kernel.org
Subject: Re: Link breakage on all architectures which implement their own show_mem
Date: Fri, 25 Mar 2011 14:38:07 -0400	[thread overview]
Message-ID: <AANLkTi==Ddg-Dx6w==MG4f4rbvLXCxY1c9NieitJctJC@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1103241520120.26730@chino.kir.corp.google.com>

On Thu, Mar 24, 2011 at 6:21 PM, David Rientjes <rientjes@google.com> wrote:
> On Wed, 23 Mar 2011, James Bottomley wrote:
>
>> This is the problem a lot of architectures will see:
>>
>> Specifically this:
>>   LD      vmlinux.o
>> lib/lib.a(show_mem.o): In function `show_mem':
>> (.text.show_mem+0x0): multiple definition of `show_mem'
>> arch/parisc/mm/built-in.o:(.text.show_mem+0x0): first defined here
>> make: *** [vmlinux.o] Error 1
>>
>> Caused by this patch:
>>
>> commit ddd588b5dd55f14320379961e47683db4e4c1d90
>> Author: David Rientjes <rientjes@google.com>
>> Date:   Tue Mar 22 16:30:46 2011 -0700
>>
>>     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
>> files.
>>
>
> Thanks for the report, James.
>
> This was also reported by Stephen on LKML when he merged the latest Linus
> tree into linux-next.  Andrew suggested that we remove __show_mem()
> entirely and simply add its argument to show_mem() in all the
> architectures.  I have a patch at:
>
>        http://marc.info/?l=linux-kernel&m=130100511521954
>
> I don't have a parisc cross compiler, so if you could try it out and add
> your Tested-by that would be great

You can find basic cross compilers for a variety of architectures
already built here:

http://www.kernel.org/pub/tools/crosstool/

josh

  parent reply	other threads:[~2011-03-25 18:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 16:41 Link breakage on all architectures which implement their own show_mem James Bottomley
2011-03-24 22:21 ` David Rientjes
2011-03-25 14:13   ` James Bottomley
2011-03-25 20:02     ` David Rientjes
2011-03-25 18:38   ` Josh Boyer [this message]
2011-03-25 10:55 ` Benjamin Herrenschmidt
2011-03-25 14:11   ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi==Ddg-Dx6w==MG4f4rbvLXCxY1c9NieitJctJC@mail.gmail.com' \
    --to=jwboyer@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).