[all-commits] [llvm/llvm-project] ab0931: MC: Set MCSection::LinkerRelaxable for linker-rela...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed May 28 22:46:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab0931b6389838cb5d7d11914063a1ddd84102f0
      https://github.com/llvm/llvm-project/commit/ab0931b6389838cb5d7d11914063a1ddd84102f0
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-05-28 (Wed, 28 May 2025)

  Changed paths:
    M llvm/lib/MC/MCObjectStreamer.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
    M llvm/test/MC/RISCV/align.s
    M llvm/test/MC/RISCV/cfi-advance.s

  Log Message:
  -----------
  MC: Set MCSection::LinkerRelaxable for linker-relaxable MCAlignFragment

Commit bb03cdcb441fd68da9d1ebb7d5f39f73667cd39c caused a Linux kernel
regression https://github.com/ClangBuiltLinux/linux/issues/2091

When a section contains linker-relaxable MCAlignmentFragment but no
linker-relaxable instructions, the RISCVAsmBackend::isPCRelFixupResolved
code path should be taken as well. The #76552 condition in the fragment
walk code will make the fixup unresolvable, leading to a relocation.



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