Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685934

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

From Nicolas Pitre <nico@fluxnic.net>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)
Date 2017-07-12 19:50 +0200
Message-ID <u2tVU-2OP-13@gated-at.bofh.it> (permalink)
References (1 earlier) <u1go1-5LI-23@gated-at.bofh.it> <u1krE-8fC-9@gated-at.bofh.it> <u1l4n-fA-13@gated-at.bofh.it> <u1wsN-7rZ-1@gated-at.bofh.it> <u2sGt-25N-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 12 Jul 2017, Andi Kleen wrote:

> Nicholas Piggin <npiggin@gmail.com> writes:
> >> 
> >> I think we should aim for gc-sections to be used by default and have LTO 
> >> as a possible option only.
> >
> > I agree after it starts getting implemented and debugged by small
> > system users, we could make it default in the interest of sharing
> > testing and reducing combinations.
> 
> From what i understand the main drawback in the past was
> is that various linker versions become very slow with thousands of
> sections.
> 
> So it may cost you built time. For a special small build it's probably
> ok, but you wouldn't want to make it default.
> 
> Also usually it's only useful without modules because if you
> use modules EXPORT_SYMBOL pulls in a lot of unused functions.

I created CONFIG_TRIM_UNUSED_KSYMS mainly to avoid that issue. It is 
highly effective with either gc-sections and LTO.


Nicolas

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] x86: enable dead code and data elimination (LTO) Nicholas Piggin <npiggin@gmail.com> - 2017-07-09 05:20 +0200
  Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Ingo Molnar <mingo@kernel.org> - 2017-07-09 11:10 +0200
    Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-07-09 15:30 +0200
      Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-07-09 16:10 +0200
        Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Nicholas Piggin <npiggin@gmail.com> - 2017-07-10 04:20 +0200
          Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Andi Kleen <andi@firstfloor.org> - 2017-07-12 18:30 +0200
            Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Nicolas Pitre <nico@fluxnic.net> - 2017-07-12 19:50 +0200
            Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) Nicholas Piggin <npiggin@gmail.com> - 2017-07-13 05:00 +0200

csiph-web