[all-commits] [llvm/llvm-project] 2f7bd4: [ELF] Enable parallel relocation scanning for -z n...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Apr 2 22:00:37 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f7bd4fa97232dfab7f2347c745005eb9e2ffd2d
      https://github.com/llvm/llvm-project/commit/2f7bd4fa97232dfab7f2347c745005eb9e2ffd2d
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-04-02 (Thu, 02 Apr 2026)

  Changed paths:
    M lld/ELF/Arch/PPC64.cpp
    M lld/ELF/Relocations.cpp
    M lld/ELF/SyntheticSections.cpp
    M lld/test/ELF/combreloc.s

  Log Message:
  -----------
  [ELF] Enable parallel relocation scanning for -z nocombreloc and PPC64 (#190309)

The `bool serial` condition in scanRelocations disabled parallelism for
three cases: -z nocombreloc, MIPS, and PPC64. Resolve two cases:

- nocombreloc: .rela.dyn is now always created with combreloc=true so
  non-relative relocations are sorted deterministically. Since
  #187964 already separates relative relocations unconditionally,
  the only remaining effect of -z nocombreloc is suppressing
  DT_RELACOUNT (gated on ctx.arg.zCombreloc in DynamicSection).

- PPC64: After #181496 moved scanning into scanSectionImpl, the
  sole thread-unsafe access is ctx.ppc64noTocRelax (DenseSet::insert).
  Protect it with ctx.relocMutex, which is already used for rare
  operations during parallel scanning.

MIPS retains serial scanning due to `MipsGotSection` mutations.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list