From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id F3DC43875DFD for ; Fri, 20 Mar 2020 07:59:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F3DC43875DFD Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 11901AC92; Fri, 20 Mar 2020 07:59:04 +0000 (UTC) Subject: Re: [PATCH] plugin: Don't invoke LTO-wrapper To: "H.J. Lu" , Alan Modra Cc: Binutils References: <20200319165017.1273885-1-hjl.tools@gmail.com> <20200320023832.GK4583@bubble.grove.modra.org> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <32d05f6a-8e88-e42b-7d7e-561931c9467f@suse.cz> Date: Fri, 20 Mar 2020 08:59:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 07:59:06 -0000 On 3/20/20 5:42 AM, H.J. Lu via Binutils wrote: > On Thu, Mar 19, 2020 at 7:38 PM Alan Modra wrote: >> >> On Thu, Mar 19, 2020 at 09:50:17AM -0700, H.J. Lu via Binutils wrote: >>> Since LTO plugin may generate more than one ltrans.o file from one input >>> IR object as LTO wrapper ignores -flto-partition=none: >>> >>> lto-wrapper.c:608: >>> >>> 604 /* Drop arguments that we want to take from the link line. */ >>> 605 case OPT_flto_: >>> 606 case OPT_flto: >>> 607 case OPT_flto_partition_: >>> 608 continue; >>> >>> the LTO wrapper approach is not only slow but also unreliable. Since >>> the LTO plugin API has been extended to add LDPT_ADD_SYMBOLS_V2 with >>> symbol type and section kind, we can use LDPT_ADD_SYMBOLS_V2 to get >>> symbol type, instead of invoking the LTO wrapper. >>> >>> PR binutils/25640 >>> * plugin.c (plugin_list_entry): Add has_symbol_type. >>> (add_symbols_v2): New function. >>> (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin >>> provides symbol type. >>> (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2. >>> (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if >>> available. >> >> OK. Are you going to remove the LTO wrapper code from binutils? > > Here is the patch to remove the LTO wrapper code. > > OK for master? > > Thanks. > Hello. Thank you very much for the patches. Can you please than backport this to 2.34 branch? Thanks, Martin