backslashes in quoted symbol names

Nick Clifton nickc@redhat.com
Mon Jun 7 10:46:10 GMT 2021


Hi Jan,

> when you introduced general support for quoted symbol names, did
> you consider \ (used to escape double quotes) to itself possibly be
> part of a (quoted) symbol name?

To be honest, no I did not consider this. :-(

> As pointed out in
> 
> https://sourceware.org/pipermail/binutils/2021-June/116852.html
> 
> in a somewhat hidden way, not requiring backslashes to themselves
> also need escaping means that despite the quoting it's impossible
> to have a symbol name end in a backslash. Granted that's a pretty
> unusual way of naming a symbol, but anything requiring quoting
> probably is.
> 
> Question is whether it is reasonable to change this now, almost 6
> years later, and potentially break people already using backslashes
> in symbol names.

Hmmm.  I am tempted to say that we should fix this, on the grounds
that symbol names that include backslashes must surely be very rare.
I suppose that if we are being really paranoid we should include a
method for restoring the old behaviour if need be.  (Ie yet another
command line options).

Is this only a problem for backslashes at the end of symbol names ?
Presumably the backslash-at-end is currently ignored ?  One thing
we could do in this case is issue a warning message saying that the
backslash will be ignored.  Then any user that is affected could fix
their code to escape the backslash.

Cheers
   Nick



More information about the Binutils mailing list