I started this patch as a refactoring, tried to make a helper for
getting symbol names, similar to how we get section names
used in warning messages.
So this patch cleanups the code and fixes an issue: symbol names
in warning messages were not demangled.
Since we're now demangling these symbols, I wonder if it would make sense here and in the other warning to quote the symbol names, because demangled names can be phrases rather than individual names. Quoting would make the name easier to read, I think.