public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <oliva@gnu.org>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [PR24444] speed up locview resolution wiht relaxable frags
Date: Sat, 04 May 2019 00:56:00 -0000	[thread overview]
Message-ID: <orbm0j6nsc.fsf@lxoliva.fsfla.org> (raw)
In-Reply-To: <20190503011420.GG3195@bubble.grove.modra.org> (Alan Modra's	message of "Fri, 3 May 2019 10:44:20 +0930")

On May  2, 2019, Alan Modra <amodra@gmail.com> 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 <http://www.gnu.org/licenses/>.  */

	.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


-- 
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ás - Che GNUevara

  reply	other threads:[~2019-05-04  0:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-13  8:57 Alexandre Oliva
2019-04-14 13:22 ` Alan Modra
2019-04-16 13:24   ` Alexandre Oliva
2019-04-17  1:32     ` Alan Modra
2019-04-24 23:18     ` Alan Modra
2019-04-30  5:49       ` Alexandre Oliva
2019-05-03  1:14         ` Alan Modra
2019-05-04  0:56           ` Alexandre Oliva [this message]
2019-05-04  3:22         ` Alexandre Oliva
2019-05-04  5:44           ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orbm0j6nsc.fsf@lxoliva.fsfla.org \
    --to=oliva@gnu.org \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).