Move the init array/fini array sorting to the Output ELF writer.
AFAIK, this is only needed by the X86_64/ARM ABI.
This shaves time taken to self host lld by 0.2 seconds.
Before patch
----------------
4791.062059 task-clock # 1.634 CPUs utilized ( +- 0.28% )
61,107 context-switches # 0.013 M/sec ( +- 0.56% )
2.932902671 seconds time elapsed ( +- 0.84% )
After patch
-------------
4608.417248 task-clock # 1.669 CPUs utilized ( +- 0.30% )
61,616 context-switches # 0.013 M/sec ( +- 0.63% )
2.761012703 seconds time elapsed ( +- 0.63% )
llvm-svn: 232866
1.5 KiB
1.5 KiB