Previously, we used input section names as output section names. That resulted
that we created lots of sections for comdat or -f{function,data}-section sections.
This patch is reduces the number of sections by dropping suffix from
all section names which start with ".text.", ".rodata.", ".data." or ".bss.".
GNU linker does this using the internal linker script, but for LLD I just
chose to do that directly.
Interestingly, this makes the linker faster. Time to link Clang is this.
Before:
real 0m0.537s user 0m0.433s sys 0m0.104s
After:
real 0m0.390s user 0m0.268s sys 0m0.120s
It make sense because previously we created 57659 sections, and it's now
only 27.
Pass in the name and you can drop the template.