From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id A52723870914 for ; Sun, 14 Feb 2021 15:36:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A52723870914 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 8A0DE3032F8D; Sun, 14 Feb 2021 16:36:03 +0100 (CET) Received: by librem (Postfix, from userid 1000) id 3F27DC1218; Sun, 14 Feb 2021 16:34:53 +0100 (CET) From: Mark Wielaard To: dwz@sourceware.org Cc: Mark Wielaard Subject: [PATCH] Remove left over "negate" adjustment in compute_abbrevs. Date: Sun, 14 Feb 2021 16:34:43 +0100 Message-Id: <20210214153443.19697-1-mark@klomp.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP 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: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2021 15:36:06 -0000 Before commit 47af8da7c "Assorted DW_FORM_implicit_const fixes" there was a hack to track whether decl/call_file line numbers had been translated already. This worked by negating the value once it was and not translating again when the value was negative. Then in compute_abbrevs all negated values we made positive again. Most of this hack was removed in the above commit. Except for making all negated values positive again in compute_abbrevs. Remove it there too. No decl/call_file line number tables can ever be negative. * dwz.c (compute_abbrevs): Remove negate adjustment for DW_AT_decl_file and DW_AT_call_file attribute DW_FORM_implicit_const values. --- dwz.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/dwz.c b/dwz.c index 992da77..0664052 100644 --- a/dwz.c +++ b/dwz.c @@ -11622,20 +11622,7 @@ compute_abbrevs (DSO *dso) abbrev_size += size_of_uleb128 (arr[i]->attr[j].attr); abbrev_size += size_of_uleb128 (arr[i]->attr[j].form); if (arr[i]->attr[j].form == DW_FORM_implicit_const) - { - /* If this is a shared abbrev for a file reference - attribute, update to the new file number (in the - mulifile .debug_line). Note that this might - change the abbrev size... */ - if (unlikely (wr_multifile || op_multifile) - && (arr[i]->attr[j].attr == DW_AT_decl_file - || arr[i]->attr[j].attr == DW_AT_call_file)) - { - if (arr[i]->values[j] < 0) - arr[i]->values[j] = -arr[i]->values[j]; - } - abbrev_size += size_of_sleb128 (arr[i]->values[j]); - } + abbrev_size += size_of_sleb128 (arr[i]->values[j]); } abbrev_size += 2; } -- 2.20.1