Splitting SHF_MERGE|SHF_STRINGS with sh_entsize=1 is a bottleneck linking a
program with large .debug_str in -O1/-O2 mode. This patch picks up D45571 with
small changes to speed up splitting.
We could also use other algorithms like weakened poly1305 but I am unsure the complexity
justifies.
Old:
jq -r '.traceEvents[] | select(.name|startswith("Total")) | "\(.dur/1000000) \(.name)"' 4.45245 Total ExecuteLinker 4.446075 Total Link 2.896229 Total Merge/finalize input sections 0.768235 Total Write output file 0.220198 Total Parse input files
New:
3.659616 Total ExecuteLinker 3.653682 Total Link 2.15211 Total Merge/finalize input sections 0.775001 Total Write output file 0.22633 Total Parse input files
I have adjusted some tests to demonstrate the effects.
If accepted I'll fix all the remaining tests.