linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, anton@samba.org, Alan Modra <amodra@gmail.com>
Subject: Re: [RFC PATCH] powerpc/Makefile: Add option to build with gold
Date: Sat, 13 Aug 2016 00:30:09 +1000	[thread overview]
Message-ID: <20160813003009.6ff8eea5@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1471001421-9845-1-git-send-email-mpe@ellerman.id.au>

On Fri, 12 Aug 2016 21:30:21 +1000
Michael Ellerman <mpe@ellerman.id.au> wrote:

> This adds a Kconfig option which can be turned on to enable use of the
> gold linker. It depends on DEBUG_KERNEL to hopefully hide it from users
> who don't really care about it, and also !COMPILE_TEST so that it will
> be turned off for allyes/modconfig builds.
> 
> In the wrapper script we currently always use ${CROSS}ld, so instead
> make that the default if ${LD} isn't already set. When we're called as
> part of a normal build ${LD} will be set, but if the wrapper is called
> separately we will fall back to ${CROSS}ld as before.
> 
> With this enabled I have successfully built a ppc64[le]_defconfig using
> a toolchain which only has ld.gold.

Nice. Out of curiosity, I ran some testing.

On allyesconfig with sfr's thin archives patch and --gc-sections,
ld.gold is about 10% faster than ld.bfd. About 11 seconds vs 12. A lot
of that is in utf8 conversions from "fnmatch" it's using to match
section names though. Setting LANG=C brings it down to 8 seconds and
helps ld.bfd a tiny bit but not much. So that's a pretty good win.
Threading still has some crashes.

ld.gold creates a larger executable though. It seems to be creating a
lot more branch stubs (19000 vs 6500 for ld.bfd). 

I should keep in mind we link the kernel about 4 times every build
before complain too much about linker performance to the binutils guys.
I wonder if we couldn't objcopy the kallsyms onto the end of the image
to avoid that relinking.

      reply	other threads:[~2016-08-12 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 11:30 [RFC PATCH] powerpc/Makefile: Add option to build with gold Michael Ellerman
2016-08-12 14:30 ` Nicholas Piggin [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=20160813003009.6ff8eea5@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=amodra@gmail.com \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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).