NO_DOLLAR_IN_LABEL

Paul Eggert eggert@twinsun.com
Sun Jan 31 23:58:00 GMT 1999


Here's a dumb question: if gas and gld can handle arbitrary strings as
names, why not skip name mangling and assembling entirely?  Wouldn't
this be cleanest?

Obviously we would still have to mangle/assemble on platforms that
only allow A-Za-z0-9_ (I'll write more about this later).  And even
for GNU/Linux, we'd need backwards-compatibility options.  But with
the right compatibility option or two, it seems to me that the
transition to straight-through regime would be doable.  E.g. gcc could
optionally generate both old (mangled) and new (unmangled) format
external definition symbols, so that a shared object would link with
both old- and new-format executables.  This would work because the two
name formats can't possibly collide.

I vaguely recall your mentioning the need for a transition to a
new-format mangling scheme for C++ anyway.....

Obviously we'd also need to translate to UTF-8 for Java (and
optionally for other languages), but other than this, it seems to me
that we don't have to mangle if we don't want to.



More information about the Gcc mailing list