ELF2: Merge .{text,rodata,data,bss}.* sections.
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 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 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 now only 27. llvm-svn: 250315
Loading
Please sign in to comment