aboutsummaryrefslogtreecommitdiff
path: root/lld/ELF/Relocations.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-09-21 11:43:12 -0700
committerFangrui Song <i@maskray.me>2022-09-21 11:43:13 -0700
commitbce6416775ea1577f0a7f82cc012cf0c1b9d9ce5 (patch)
tree9e7e22b175d461f21555145af1057126e17c4c63 /lld/ELF/Relocations.cpp
parent4f1474daec4fbdca779b4d0aa3de19950c8287b5 (diff)
downloadllvm-bce6416775ea1577f0a7f82cc012cf0c1b9d9ce5.zip
llvm-bce6416775ea1577f0a7f82cc012cf0c1b9d9ce5.tar.gz
llvm-bce6416775ea1577f0a7f82cc012cf0c1b9d9ce5.tar.bz2
[ELF] --pack-dyn-relocs=android: scan relocation serially after D133003
https://reviews.llvm.org/D133003#3806508 can reproduce a non-determinism with --threads=4. Making the config serial fixes non-determinism (by running the link many times and compare output).
Diffstat (limited to 'lld/ELF/Relocations.cpp')
-rw-r--r--lld/ELF/Relocations.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index ecb0c48..027f2c3 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -1541,10 +1541,11 @@ template <class ELFT> void elf::scanRelocations() {
// directly processed by InputSection::relocateNonAlloc.
// Deterministic parallellism needs sorting relocations which is unsuitable
- // for -z nocombreloc. MIPS and PPC64 use global states which are not suitable
- // for parallelism.
- bool serial = !config->zCombreloc || config->emachine == EM_MIPS ||
- config->emachine == EM_PPC64;
+ // for -z nocombreloc and does not currently work with
+ // AndroidPackedRelocationSection. MIPS and PPC64 use global states which are
+ // not suitable for parallelism.
+ bool serial = !config->zCombreloc || config->androidPackDynRelocs ||
+ config->emachine == EM_MIPS || config->emachine == EM_PPC64;
parallel::TaskGroup tg;
for (ELFFileBase *f : ctx->objectFiles) {
auto fn = [f]() {