public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Palmer Dabbelt <palmer@dabbelt.com>,
	Andrew Waterman <andrew@sifive.com>,
	Jim Wilson <jim.wilson.gcc@gmail.com>,
	Nelson Chu <nelson@rivosinc.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH RFC] RISC-V: alter the special character used in FAKE_LABEL_NAME
Date: Fri, 4 Aug 2023 14:04:44 +0200	[thread overview]
Message-ID: <37394934-ef7a-bc51-2f2c-9b5999b2847b@suse.com> (raw)
In-Reply-To: <d1fa1a21-e34f-865b-3326-18e16d3a4aa7@suse.com>

On 30.03.2023 14:01, Jan Beulich wrote:
> On 10.03.2023 10:36, Jan Beulich via Binutils wrote:
>> The use of a space char there collides with anything using temp_ilp(),
>> i.e. at present at least with the special % operator available in
>> alternate macro mode. Further uses of the function may appear at any
>> time. This likely is a result of write.h's comment not properly
>> spelling out all the constraints placed on the selection of the special
>> character used. Then again RISC-V anyway violates a constraint which has
>> been properly spelled out there: Such labels _do_ appear in assembler
>> output.
>> ---
>> RFC: Of course this breaks interoperability between older gas / new
>>      objdump and vice versa. But I don't see a way to resolve the issue
>>      at hand without introducing such a discontinuity. To limit "damage"
>>      a little, riscv_symbol_is_valid() could of course be tought to also
>>      ignore old style fake label names. (Personally I view this tying of
>>      functionality between assembler and disassembler as problematic
>>      anyway.) Thoughts?
>>
>> I question the use of FAKE_LABEL_NAME in make_internal_label(). The
>> comment in tc-riscv.h isn't correct anyway because of (at least) this
>> use - the symbols generated there are never used for Dwarf. And them all
>> being the same makes it rather hard to associate relocations resolved to
>> symbol names (e.g. "objdump -dr" output) with the actual instance that's
>> referenced. Their naming should imo rather follow the model of
>> {fb,dollar}_label_name().
> 
> I wanted to further mention the following: Using '?' or really any
> printable character has the downside of (pretty much) closing the road
> of making such characters usable in normal (unquoted) symbols. '?' in
> particular is, at least on x86, used e.g. in Microsoft VC's C++ name
> mangling scheme. Yet as per the comment in tc-riscv.h it is specifically
> a goal to use a printable character here.

All,

with 2.41 out of the way, may I ask that we make some progress here? All
I got back so far was agreement that the situation isn't nice. But that
doesn't help determining how to improve things (a) without too much
breakage and (b) with the goal of not needing to redo this yet again
later.

Thanks, Jan

      reply	other threads:[~2023-08-04 12:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  9:36 Jan Beulich
2023-03-10  9:40 ` Jan Beulich
2023-03-13 12:06   ` Nick Clifton
2023-03-13 12:52     ` Jan Beulich
2023-03-13 14:25       ` Nick Clifton
2023-03-13 15:57         ` Jan Beulich
2023-03-15 11:08           ` Nick Clifton
2023-03-15 15:45             ` Jan Beulich
2023-03-15 16:05 ` Palmer Dabbelt
2023-03-16 10:35   ` Jan Beulich
2023-03-30 12:01 ` Jan Beulich
2023-08-04 12:04   ` Jan Beulich [this message]

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=37394934-ef7a-bc51-2f2c-9b5999b2847b@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=nelson@rivosinc.com \
    --cc=palmer@dabbelt.com \
    /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).