[PATCH] D59780: Support Intel Control-flow Enforcement Technology
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 10:22:17 PDT 2019
ruiu created this revision.
ruiu added reviewers: xiangzhangllvm, MaskRay, peter.smith, hjl.tools.
Herald added subscribers: jdoerfert, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
This patch is based on https://reviews.llvm.org/D58102. The changes
from the original patche is as follows:
- The code to parse .note.gnu.property is moved from Driver to InputFiles.
- Several heavy loops (that costs O(n*m) where n and m are the number of files and input sections) are removed.
- ".splt" is now In.Plt. Changes to Relocations.cpp are reverted as we no longer need them.
- Symbol::getSPltVA is removed, as we don't need that function.
- New comments are added.
- Code and test files are generally simplified.
Because I don't have a CPU nor an emulator supporting CET, I can't run
the produced code. So I didn't test the generated executables.
There are a few TODOs in this patch:
- Is --force-cet the best option name? H. J. Lu pointed out that gold has `-z ibtplt` and other options, but I couldn't find these options in the binutils' repository. Is the option really implemneted to gold?
- What is the compiler flag to enable CET? I'd like to write it in a comment for reference.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59780
Files:
lld/ELF/Arch/X86.cpp
lld/ELF/Arch/X86_64.cpp
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/InputFiles.cpp
lld/ELF/InputFiles.h
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/Inputs/x86-64-cet1.s
lld/test/ELF/Inputs/x86-64-cet2.s
lld/test/ELF/Inputs/x86-64-cet3.s
lld/test/ELF/Inputs/x86-64-cet4.s
lld/test/ELF/i386-cet.s
lld/test/ELF/x86-64-cet.s
llvm/include/llvm/Object/ELFTypes.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59780.192138.patch
Type: text/x-patch
Size: 28871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190325/36baaf4f/attachment-0001.bin>
More information about the llvm-commits
mailing list