This implements the last step of
https://discourse.llvm.org/t/parallel-input-file-parsing/60164 for the ELF port.
For an ELF object file, we previously did: parse, (parallel) initializeLocalSymbols, (parallel) postParseObjectFile.
Now we do: parse, (parallel) initSectionsAndLocalSyms, (parallel) postParseObjectFile.
initSectionsAndLocalSyms does most of input section initialization.
The sequential parse does SHT_ARM_ATTRIBUTES/SHT_RISCV_ATTRIBUTES/SHT_GROUP initialization for now.
Performance linking some programs with --threads=8 (glibc 2.33 malloc and mimalloc):
- clang: 1.05x as fast with glibc malloc, 1.03x as fast with mimalloc
- chrome: 1.04x as fast with glibc malloc, 1.03x as fast with mimalloc
- internal search program: 1.08x as fast with glibc malloc, 1.05x as fast with mimalloc
I don't think any caller has used the ignoreComdats default parameter, is it worth removing the = false ?