Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbdGIN3s (ORCPT ); Sun, 9 Jul 2017 09:29:48 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:28962 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdGIN3p (ORCPT ); Sun, 9 Jul 2017 09:29:45 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com v69DTcpj000596 X-Nifty-SrcIP: [209.85.213.179] MIME-Version: 1.0 In-Reply-To: <20170709090551.bm2c55ctt3togim7@gmail.com> References: <20170709031333.29443-1-npiggin@gmail.com> <20170709090551.bm2c55ctt3togim7@gmail.com> From: Masahiro Yamada Date: Sun, 9 Jul 2017 22:29:37 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] x86: enable dead code and data elimination (LTO) To: Ingo Molnar Cc: Nicholas Piggin , linux-arch , Linux Kbuild mailing list , X86 ML , Linux Kernel Mailing List , Nicolas Pitre , Arnd Bergmann , Paul Burton , Linus Torvalds , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 38 Hi. 2017-07-09 18:05 GMT+09:00 Ingo Molnar : > > * Nicholas Piggin wrote: > >> FYI, easiest way to check if you forgot to KEEP a linker table is >> to look at `readelf -S vmlinux` differences, and to see what is >> being trimmed, look at nm differences or use --print-gc-sections >> LD option to see what symbols you're trimming. Linker tables, >> boot entry, and exception entry tends to require anchoring. > > Could you please add a debug build target to display all discarded > symbols/sections? Something like: > > make lto-check > > ... or so? > > Thanks, > > Ingo Actually, LTO activity existed some years ago (but not pulled in). http://www.spinics.net/lists/linux-kbuild/msg09242.html IIUC, this patch enables "dead code elimination", (or "garbage collection"?), but I think it is different from what is called LTO. -- Best Regards Masahiro Yamada