mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: cmetcalf@ezchip.com
Cc: linux-kernel@vger.kernel.org, viro@ZenIV.linux.org.uk,
	jmorris@namei.org, akpm@linux-foundation.org,
	sudipm.mukherjee@gmail.com
Subject: Re: [PATCH] lib/clz_tab.c: put in lib-y rather than obj-y
Date: Tue, 22 Dec 2015 12:46:06 -0500 (EST)	[thread overview]
Message-ID: <20151222.124606.1694650787450943904.davem@davemloft.net> (raw)
In-Reply-To: <1450806084-26727-1-git-send-email-cmetcalf@ezchip.com>

From: Chris Metcalf <cmetcalf@ezchip.com>
Date: Tue, 22 Dec 2015 12:41:24 -0500

> The clz table (__clz_tab) in lib/clz_tab.c is also provided as part
> of libgcc.a, and many architectures link against libgcc.  To allow
> the linker to avoid a multiple-definition link failure, clz_tab.o
> has to be in lib/lib.a rather than lib/builtin.o.  The specific
> issue is that libgcc.a comes before lib/builtin.o on vmlinux.o's
> link command line, so its _clz.o is pulled to satisfy __clz_tab,
> and then when the remainder of lib/builtin.o is pulled in to satisfy
> all the other dependencies, the __clz_tab symbols conflict.  By
> putting clz_tab.o in lib.a, the linker can simply avoid pulling
> it into vmlinux.o when this situation arises.
> 
> The definitions of __clz_tab are the same in libgcc.a and in the
> kernel; arguably we could also simply rename the kernel version,
> but it's unlikely the libgcc version will ever change to become
> incompatible, so just using it seems reasonably safe.
> 
> Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>

No objections from me:

Acked-by: David S. Miller <davem@davemloft.net>

      reply	other threads:[~2015-12-22 17:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 17:41 Chris Metcalf
2015-12-22 17:46 ` David Miller [this message]

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=20151222.124606.1694650787450943904.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=cmetcalf@ezchip.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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

all inboxes | Powered by JetHome®