From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4126 invoked by alias); 4 May 2019 00:56:04 -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 4106 invoked by uid 89); 4 May 2019 00:56:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.5 required=5.0 tests=AWL,BAYES_20,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.1 spammy=latin, Latin, hay, views X-HELO: linux-libre.fsfla.org Received: from linux-libre.fsfla.org (HELO linux-libre.fsfla.org) (209.51.188.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 May 2019 00:56:02 +0000 Received: from free.home (home.lxoliva.fsfla.org [172.31.160.164]) by linux-libre.fsfla.org (8.15.2/8.15.2/Debian-3) with ESMTP id x440tu1k002188; Sat, 4 May 2019 00:55:57 GMT Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTP id x440tlou302096; Fri, 3 May 2019 21:55:48 -0300 From: Alexandre Oliva To: Alan Modra Cc: binutils@sourceware.org Subject: Re: [PR24444] speed up locview resolution wiht relaxable frags References: <20190414132247.GO14424@bubble.grove.modra.org> <20190424231820.GE9648@bubble.grove.modra.org> <20190503011420.GG3195@bubble.grove.modra.org> Date: Sat, 04 May 2019 00:56:00 -0000 In-Reply-To: <20190503011420.GG3195@bubble.grove.modra.org> (Alan Modra's message of "Fri, 3 May 2019 10:44:20 +0930") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00122.txt.bz2 On May 2, 2019, Alan Modra wrote: > On Tue, Apr 30, 2019 at 02:49:38AM -0300, Alexandre Oliva wrote: >> AFAICT fixing this will require introducing artificial undefined symbols >> to be used as previous view label and previous view number for each >> subsection, and then, when ordering subsections and sections, defining >> the initial previous symbols of each subsection as equal to the final >> previous symbols of the previous subsection in the same section. > Don't you already keep struct line_entry on per-subseg lists? Yeah, sorry. I had indeed started out worried about that, but I failed to remove some traces of that suspicion from my message even after I narrowed the problem down to the boundaries. This testcase demonstrates the problem: the generated line number program has nonzero views at subsection boundaries, but the view numbers computed and assigned by the view expressions do not match those implied by the line number program, because we assume a view reset when first entering a subsection. This would only be appropriate (and even then somewhat problematic) if we generated a separate line number program, or forced a view reset in the line number program at subsection boundaries. /* Test view numbering continuity at subsection borders. Copyright (C) 2017-2019 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ .file "dwarf2-19.c" .text 0 .balign 4 .globl _start _start: .file 1 "dwarf2-19.c" .loc 1 1 view 0 .section .rodata .uleb128 .L1 .uleb128 .L3 .uleb128 .L4 .uleb128 .L2 .text 1 .loc 1 2 view .L1 /* same address as view 0 above -> view 1 */ .text 2 .loc 1 3 view .L2 /* same address as .L4 below -> view 2 */ .text 1 .dc.l 0 .loc 1 4 view .L3 /* bumped address from .L1's, view 0 */ .loc 1 5 view .L4 /* same address, view 1 */ #as: #readelf: -x.rodata -wL #name: DWARF2 19 # The am33 avr cr16 crx ft32 mn10 msp430 nds32 pru rl78 and xtensa targets = do not evaluate the subtraction of symbols at assembly time. # The riscv targets do not support the subtraction of symbols. # The tile targets require 8-byte instructions, but the test only simulates= 4-byte instructions. #notarget: am3*-* avr-* cr16-* crx-* ft32*-* mn10*-* msp430-* nds32*-* pru-= * riscv*-* rl78-* tile*-* xtensa-* Hex dump of section '\.rodata': 0x00000000 01000102 *.* Contents of the \.debug_line section: CU: dwarf2-19\.c: File name *Line number *Starting address *View +Stmt dwarf2-19\.c *1 *0 +x dwarf2-19\.c *2 *0 *1 +x dwarf2-19\.c *4 *0x4 +x dwarf2-19\.c *5 *0x4 *1 +x dwarf2-19\.c *3 *0x4 *2 +x --=20 Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain Engineer Free Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jam=C3=A1s - Che GNUevara