[PATCH] D59780: Support Intel Control-flow Enforcement Technology
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 00:24:33 PST 2019
MaskRay updated this revision to Diff 233263.
MaskRay added a comment.
Apply two patches
- uint64_t Plt = In.Plt->getVA();
+ uint64_t Plt = In.IBTPlt ? In.IBTPlt->getVA() : In.Plt->getVA();
- i/lld/ELF/Driver.cpp
+++ w/lld/ELF/Driver.cpp
@@ -1705,2 +1705,4 @@ template <class ELFT> static uint32_t getAndFeatures() {
- } else if (!features && config->requireCET)
- error(toString(f) + ": --require-cet: file is not compatible with CET");
+ } else if (config->requireCET && !(features & GNU_PROPERTY_X86_FEATURE_1_IBT)) {
+ warn(toString(f) + ": --require-cet: file is not compatible with CET");
+ features |= GNU_PROPERTY_X86_FEATURE_1_IBT;
+ }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59780/new/
https://reviews.llvm.org/D59780
Files:
lld/ELF/Arch/X86.cpp
lld/ELF/Arch/X86_64.cpp
lld/ELF/Driver.cpp
lld/ELF/Options.td
lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h
lld/ELF/Target.h
lld/ELF/Writer.cpp
lld/docs/ld.lld.1
lld/test/ELF/i386-cet.s
lld/test/ELF/i386-feature-cet.s
lld/test/ELF/x86-64-cet.s
lld/test/ELF/x86-64-feature-cet.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59780.233263.patch
Type: text/x-patch
Size: 24728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191211/ab0ad156/attachment.bin>
More information about the llvm-commits
mailing list