From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31168 invoked by alias); 20 May 2015 15:13:28 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 30783 invoked by uid 89); 20 May 2015 15:13:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f47.google.com Received: from mail-oi0-f47.google.com (HELO mail-oi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 20 May 2015 15:13:26 +0000 Received: by oign205 with SMTP id n205so38348610oig.2 for ; Wed, 20 May 2015 08:13:25 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.228.67 with SMTP id sg3mr24618524oec.32.1432134804953; Wed, 20 May 2015 08:13:24 -0700 (PDT) Received: by 10.202.221.85 with HTTP; Wed, 20 May 2015 08:13:24 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 May 2015 15:13:00 -0000 Message-ID: Subject: Re: [patch][gold] Change how we compute merge mapping for strings From: =?UTF-8?Q?Rafael_Esp=C3=ADndola?= To: Binutils Cc: Cary Coutant Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00193.txt.bz2 Now with the correct email address. Sorry about that. On 20 May 2015 at 11:12, Rafael Esp=C3=ADndola = wrote: > Currently we first record the offset and hash of each string. We then > walk that computing the size from the difference in the offsets. > > This doesn't work if not every string is kept, which is what I am > trying to do (gc unused parts of SHF_MERGE sections). > > With the attached patch we first add a mapping that is missing the > output offset and once the strings are merged we just set the output > offset. > > Cheers, > Rafael > > 2015-05-20 Rafael =C3=81vila de Esp=C3=ADndola > > * merge.cc (do_add_input_section): Create mappings with no output > offset. > (finalize_merged_data): Set the output offsets. > * merge.h (Merged_string): Delete.