[PATCH] D58102: Support X86 Control-flow Enforcement Technology (CET) in LLD

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 01:19:51 PST 2019


xiangzhangllvm added a comment.

Hi ruiu:
I update the patch, all the change is to simplify collecting X86 feature as your first suggestion point out.
simplifing these code is mainly based on that we rudely erasing the .note.gnu.property sections after we deal with the GNU_PROPERTY_X86_FEATURE_1_AND property.
Instead, the old code will check and keep the non-GNU_PROPERTY_X86_FEATURE_1_AND property in .note.gnu.property section.
The reason is also writen in the patch:

+  // We rudely erase the .note.gnu.property sections in the input files. Because
 +  // till now we just implemented GNU_PROPERTY_X86_FEATURE_1_AND property, the
 +  // other unhandled properties in the sections may be discard too. It seems not
 +  // reasonable. But till now it's reasonable, because the .note.gnu.property
 +  // is a special section, all the properties in this section need to be checked
 +  // and handled. If they are simply passed to output file without being handled
 +  // there may be a bug or exception in running the output file. For example,
 +  // the GNU_PROPERTY_X86_ISA_1_USED also need all input file contain its flags,
 +  // it can't be simply passed to the output file without checking other files.
 +  // So we erase these informations before we implement the function of them.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58102/new/

https://reviews.llvm.org/D58102





More information about the llvm-commits mailing list