[all-commits] [llvm/llvm-project] 2cf04c: [X86] Do not end 'note.gnu.property' section with ...

Adhemerval Zanella via All-commits all-commits at lists.llvm.org
Sat Jan 27 10:19:46 PST 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cf04c020f4a772f1b3d683dae2763a2544720ef
      https://github.com/llvm/llvm-project/commit/2cf04c020f4a772f1b3d683dae2763a2544720ef
  Author: Adhemerval Zanella <zatrazz at gmail.com>
  Date:   2024-01-27 (Sat, 27 Jan 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86AsmPrinter.cpp
    A llvm/test/CodeGen/X86/note-cet-property-inlineasm.ll

  Log Message:
  -----------
  [X86] Do not end 'note.gnu.property' section with -fcf-protection (#79360)

The glibc now adds the required minimum ISA level for libc-nonshared.a
(linked on all programs) and this is done with an inline asm along with
.note.gnu.property and .pushsection/.popsection. However, the x86
backend always ends the 'note.gnu.property' section when building with
-fcf-protection, leading to assert failure:

llvm/llvm-project-git/llvm/lib/MC/MCStreamer.cpp:1251: virtual void
llvm::MCStreamer::switchSection(llvm::MCSection*, const llvm::MCExpr*):
Assertion `!Section->hasEnded() && "Section already ended"' failed.

[1]
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86/isa-level.c;h=3f1b269848a52f994275bab6f60dded3ded6b144;hb=HEAD

(cherry picked from commit a58c62fa824fd24d20fa2366e0ec8f241cb321fe)




More information about the All-commits mailing list