[PATCH] D47145: [X86][ELF][CET] Adding the .note.gnu.property ELF section in X86

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 05:23:07 PDT 2018


grimar added inline comments.


================
Comment at: llvm/lib/Target/X86/X86AsmPrinter.cpp:556
+      MCSection *Cur = OutStreamer->getCurrentSectionOnly();
+      MCSection *Nt = (MCSection *)MMI->getContext().getELFSection(
+          ".note.gnu.property", ELF::SHT_NOTE, ELF::SHF_ALLOC);
----------------
mike.dvoretsky wrote:
> grimar wrote:
> > Do you need this cast?
> Unfortunately, yes. The compilation fails without it.
I think you just need to add
`#include "llvm/MC/MCSectionELF.h"`
to resolve the failure.


https://reviews.llvm.org/D47145





More information about the llvm-commits mailing list