From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81865 invoked by alias); 23 Aug 2019 15:05:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 81854 invoked by uid 89); 23 Aug 2019 15:05:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Aug 2019 15:05:04 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 2F67E281ECF; Fri, 23 Aug 2019 17:05:02 +0200 (CEST) Date: Fri, 23 Aug 2019 16:32:00 -0000 From: Jan Hubicka To: Martin =?iso-8859-2?Q?Li=B9ka?= Cc: Richard Biener , GCC Patches Subject: Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'. Message-ID: <20190823150502.l4dnv3fxzsfhro4g@kam.mff.cuni.cz> References: <55b4acda-9673-557b-5819-50bff07fa095@suse.cz> <20190815143341.m4t76ewfi4zn3ayl@kam.mff.cuni.cz> <7c27efd6-e9dd-ac4f-ebaf-6626a226bb61@suse.cz> <1d1856dc-6e42-89ad-85ee-519b1a691afd@suse.cz> <20190823143728.favozczljnminl4d@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2019-08/txt/msg01661.txt.bz2 > On 8/23/19 4:37 PM, Jan Hubicka wrote: > >> On 8/23/19 2:33 PM, Martin LiĀ¹ka wrote: > >>> So in WPA, we shift order by order_base. For streaming purpose I'll need > >>> something like symtab_node::lgen_order that will be streamer_read_hwi (ib). > >> > >> And we'll probably need to stream the original LGEN symtab_node::order > >> in order to read proper section during LTRANS. Am I right? > > > > Well, at WPA time you know node->order and from lto_file_data you know > > how to recalculate node->order to original node->order at compile time. > > How can I recalculate that? One possible solution is to store order_base > for each struct lto_file_decl_data *file_data in input_node function. Yep, i would keep order_base in file_data. > > > During the section copying you can arrange it to be renamed to new > > node->order which you then stream from WPA to ltrans. > > That's a nice solution. Can you please point me to the code which > does that? copy_function_or_variable preserves section name but it seems like it should be easy to invent new name there. > > And what's your opinion about section naming scheme $name.$order.$file_hash? Why you need the file hash? I hope the orders would be reasonably stable way to code things w/o conflicts. Honza > > Thanks, > Martin > > > > > Honza > >> > >> Martin >