forked from OSchip/llvm-project
[ELF] Adjust getOutputSectionName prefix order
Sorting the prefixes by decreasing frequency can improve performance. .gcc_except_table is relatively frequent, so move it ahead. .ctors and .dtors mostly disappear and should be the last.
This commit is contained in:
parent
abbc2e997b
commit
3deb82cd07
|
@ -101,9 +101,9 @@ static StringRef getOutputSectionName(const InputSectionBase *s) {
|
|||
return v;
|
||||
|
||||
for (StringRef v :
|
||||
{".text", ".rodata", ".data.rel.ro", ".data", ".bss.rel.ro", ".bss",
|
||||
".init_array", ".fini_array", ".ctors", ".dtors", ".tbss",
|
||||
".gcc_except_table", ".tdata", ".ARM.exidx", ".ARM.extab"})
|
||||
{".text", ".data.rel.ro", ".data", ".rodata", ".bss.rel.ro", ".bss",
|
||||
".gcc_except_table", ".init_array", ".fini_array", ".tbss", ".tdata",
|
||||
".ARM.exidx", ".ARM.extab", ".ctors", ".dtors"})
|
||||
if (isSectionPrefix(v, s->name))
|
||||
return v;
|
||||
|
||||
|
|
Loading…
Reference in New Issue