Restores parallel scanRelocations phase in a two-phase approach similar
to lld:
Phase 1 (scanRelocationParallel) may run concurrently over input files.
It only performs the checks that are common to every backend and records
which relocations need further processing. It creates no GOT/PLT slots
and no dynamic relocations.
Phase 2 (replayScanRelocations) is serial and visits the recorded
relocations in input order. Slot allocation happens here and retains
determinism.
Fixes qualcomm#1938
Signed-off-by: quic-areg <aregmi@qti.qualcomm.com>
Restores parallel scanRelocations phase in a two-phase approach similar to lld:
Phase 1 (scanRelocationParallel) may run concurrently over input files. It only performs the checks that are common to every backend and records which relocations need further processing. It creates no GOT/PLT slots and no dynamic relocations.
Phase 2 (replayScanRelocations) is serial and visits the recorded relocations in input order. Slot allocation happens here and retains determinism.
Fixes #1938