OSDN Git Service

Emit Function IDs table for Control Flow Guard
authorAdrian McCarthy <amccarth@google.com>
Mon, 8 Jan 2018 16:33:42 +0000 (16:33 +0000)
committerAdrian McCarthy <amccarth@google.com>
Mon, 8 Jan 2018 16:33:42 +0000 (16:33 +0000)
commitdb9af3fb6a38028b7697aba13d4fee6af8957517
tree5faebcb17e44e96bf0d6051fe3c1071e2750eb69
parent3be0f86cb734b9a6d38779778414b59f2a91a7e8
Emit Function IDs table for Control Flow Guard

Adds option /guard:cf to clang-cl and -cfguard to cc1 to emit function IDs
of functions that have their address taken into a section named .gfids$y for
compatibility with Microsoft's Control Flow Guard feature.

Differential Revision: https://reviews.llvm.org/D40531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322005 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/MC/MCObjectFileInfo.h
include/llvm/MC/MCStreamer.h
include/llvm/MC/MCWinCOFFStreamer.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/CMakeLists.txt
lib/CodeGen/AsmPrinter/WinCFGuard.cpp [new file with mode: 0644]
lib/CodeGen/AsmPrinter/WinCFGuard.h [new file with mode: 0644]
lib/MC/MCAsmStreamer.cpp
lib/MC/MCObjectFileInfo.cpp
lib/MC/MCParser/COFFAsmParser.cpp
lib/MC/MCStreamer.cpp
lib/MC/MCWinCOFFStreamer.cpp
test/CodeGen/WinCFGuard/cfguard.ll [new file with mode: 0644]
test/MC/COFF/symidx.s [new file with mode: 0644]