On Friday, 26 January 2018 at 07:34:50 UTC, Johannes Pfau wrote:
Am Thu, 25 Jan 2018 14:24:12 -0800
schrieb Timothee Cour <[email protected]>:
[...]
What is the benefit of using link-time renaming (a linker
specific feature) instead of directly renaming the symbol in
the compiler? We could be quite radical and hash all symbols >
a certain threshold. As long as we have a hash function with
strong enough collision resistance there shouldn't be any
problem.
AFAICS we only need the mapping hashed_name ==> full name for
debugging. So maybe we can simply stuff the full, mangled name
somehow into dwarf debug information? We can even keep dwarf
debug information in external files and support for this is
just being added to GCCs libbacktrace, so even stack traces
could work fine.
-- Johannes
I thought LDC is already doing this with -hashtres?
https://github.com/ldc-developers/ldc/pull/1445