Open Gankra opened 2 years ago
initial conclusion: v0 mangled names are on average longer than the demangled name -- doing this makes the sym file longer. However this is without inlinees, which are presumably the home of really nasty generic balls.
Filing this so I don't forget it. This could significantly improve compression, and actually help downstream code in understanding the "structure" of the names as the mangling includes some metadata that you have to moreso guess at from the demangled version.
Apparently it's as simple as removing all the
name.demangle
calls in these files:https://github.com/mozilla/dump_syms/blob/213bd65cacb70520736ab3b0b1e9483c1ce84b9e/src/linux/elf.rs#L119-L151
https://github.com/mozilla/dump_syms/blob/eb4e203dfcf3b8fc8487a642d6df7279920103cb/src/windows/symbol.rs#L573
Rough design sketch:
INFO MANGLED 1
at the \~top of the file to make it unambiguous to tools that it support it whether the names are mangled or not.That's it. All the hard work would be in all the downstream tools checking for INFO MANGLED and embedding/invoking a demangler.