From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15684 invoked by alias); 17 Mar 2014 21:01:52 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 15668 invoked by uid 89); 17 Mar 2014 21:01:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 17 Mar 2014 21:01:48 +0000 Received: by mail-pa0-f54.google.com with SMTP id lf10so6274126pab.13 for ; Mon, 17 Mar 2014 14:01:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=+IQQneYqv6GSnYNG5z0RZUDxCeMcyiunKauu6BhyD1w=; b=POah/P/bV7VqAWYUEXNzpAxDbVsWDJc5S9aD8wAUY0zYpkcEy+BU9ksa+ODt+OywUV v714wzt0DuA9fgjUk5kR6TOAj//DAH9s83YUMZx8I9OYfZrryp7+jutI914IKGdSbQuh 95tvFV/+uhEOzVknSq2HIuBCkxFm/KWG3h6MAqUfiYQ/mduRPFvSfZAlqPlGZWSoSCAk zb01fdbyWq4qdDhYz7rACqf4GdnxIZi5V9uUFfqwTabqvpvZJu8zTUuB+O5BWsSiI3y7 7sP0DnDlNsbML2XiIy1scp3rZisB/OLARnApBiUBPafRlAo/OXwmrYa6Pjpm9HTomDeL rIqw== X-Gm-Message-State: ALoCoQkTHoWN8++AU+O7gb2SyfGUaODFn/0h/y7e9mDvd0pH7ka43Nkcg+9jA+xAYkgegeuc4mnF X-Received: by 10.66.65.204 with SMTP id z12mr28562761pas.60.1395090106788; Mon, 17 Mar 2014 14:01:46 -0700 (PDT) Received: from lemur (airbears-136-152-37-156.AirBears.Berkeley.EDU. [136.152.37.156]) by mx.google.com with ESMTPSA id ug9sm46056674pbc.11.2014.03.17.14.01.45 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 14:01:46 -0700 (PDT) Date: Mon, 17 Mar 2014 21:01:00 -0000 From: Martin Uecker To: Richard Biener Cc: GCC Development Subject: Re: debug strings output order is arbitrary Message-ID: <20140317140140.02402a2b@lemur> In-Reply-To: References: <20140315195827.340527e6@lemur> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2014-03/txt/msg00249.txt.bz2 Am Mon, 17 Mar 2014 09:44:53 +0100 schrieb Richard Biener : > On Sun, Mar 16, 2014 at 3:58 AM, Martin Uecker wrote: > > > > Hi list, > > > > the strings in the ".debug_str" section are output > > in an arbitrary order. Could this be changed? > > > > The function 'output_indirect_strings' in 'gcc/dwarf2out.c' > > uses htab_traverse which then outputs the string in the > > order they appear in the hash table. Instead, it would > > be nicer to output them based on their labels (which are > > assigned based on the order of creation). > > > > This would minimize differences between builds with > > slightly different build environments, e.g. directory. > > Can you propose a patch? Note that at creation time only > the string itself is known, so sorting after the string may > be another possibility. I will propose a patch. Sorting at the end would be easiest, but one could also keep track of the order. Is this performance critical? Also it seems there is other stuff which is output/indexed in hash table order, maybe this should be changed to. Martin