backslashes in quoted symbol names
Jan Beulich
jbeulich@suse.com
Mon Sep 13 10:59:50 GMT 2021
Nick,
On 13.09.2021 12:14, Nick Clifton wrote:
> Sorry for taking so long to reply to your email :-(
NP - I'm happy that you did reply.
>> I've been slowly making progress with this (without limiting the
>> diagnostic to PE); I'm now at a point where only some odd testsuite
>> fallout is left (for the extension to the existing test and one other
>> one), which I'd rather only spend time on looking into if the general
>> approach taken is deemed acceptable. The present draft patch is
>> below; two prereq patches (which I think have merit in their own
>> right) are attached.
>
> I have applied the patches - they definitely make sense.
Oh, thanks.
>> The main question really is that of get_symbol_name() and
>> read_symbol_name() acting quite differently when it comes to quoted
>> symbols. At least in case read_symbol_name() was to represent the
>> "canonical" model, I don't feel it to be in scope for me to address
>> this more fundamental issue, yet I could see this to be viewed as the
>> only sensible way out of the mess. (I think it wouldn't be overly
>> much effort to re-implement read_symbol_name() to be backed by
>> get_symbol_name(), so if that was the route to go, I might at least
>> make an attempt - so long as the present very limited handling of
>> escaped characters would be sufficient, which would mean the
>> elf/syms.s testcase would have to change.)
>>
>> As to testsuite fallout:
>> 1) s_{nios2,pru}_set() use get_symbol_name() while s_set() uses
>> read_symbol_name(). I wonder whether I wouldn't better leave the
>> target specific functions alone and switch .set in the elf/syms.s
>> testcase to .equ, .eqv, or .equiv (presumably then also allowing
>> the #notarget: to be dropped from there).
>
> Actually that is a very good idea.
Will do that then.
>> 2) {powerpc,rs6000}-ibm-aix*, tic30-coff, and z80-coff apparently
>> have not yet understood (by me) parsing issues. For ppc these are
>> on two of the .globl being added to all/quoted-sym-names.s, yet I
>> can't spot the target overriding the generic processing of the
>> directive, so I'm puzzled. I didn't look at the others in any
>> detail.
>
> No worries. I am not too concerned by AIX peculiarties, and as long as
> basic symbol name parsing carries on working, I doubt that AIX users will
> ever care.
I'll need to sort these (at least to find a suitable workaround, as
I assume I shouldn't be introducing new testsuite failures), ...
>> gas: rework handling of backslashes in quoted symbol names
>
> The patch looks good to me. I fyou are happy with it, please
> go ahead and apply it. I would much rather that we make the change
> now, than have the patch languish any longer.
... before I can go ahead here. I was actually hoping you or someone
else might be able to give me a hint as to where the anomaly might be
coming from.
Jan
More information about the Binutils
mailing list