[PATCH] D62609: [LLD][ELF][AArch64] Support for BTI and PAC

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 1 05:23:19 PDT 2019


MaskRay added inline comments.


================
Comment at: ELF/Driver.cpp:340
     error("--require-cet may not be used with -z retpolineplt");
 }
 
----------------
What about adding

    if (Config->EMachine != EM_AARCH64) {
      if (Config->PacPlt) error(...);
      if (Config->ForceBTI) error(...);
    }

here? Then, below, 

    if (Config->EMachine == EM_AARCH64 && Config->ForceBTI &&

The `Config->EMachine == EM_AARCH64` check can be removed.


================
Comment at: docs/ld.lld.1:188
 reported if there is an input object file not compatible with CET.
+.It Fl --force-bti
+Force enable AArch64 BTI in PLT, warn if Input ELF file does not have FEATURE_1_BTI property.
----------------
`.Fl` is a mdoc macro that prepends a dash., so this should be`.It Fl -force-bti` (single dash). 


================
Comment at: docs/ld.lld.1:189
+.It Fl --force-bti
+Force enable AArch64 BTI in PLT, warn if Input ELF file does not have FEATURE_1_BTI property.
 .It Fl -format Ns = Ns Ar input-format , Fl b Ar input-format
----------------
Use the full name `GNU_PROPERTY_AARCH64_FEATURE_1_BTI`?


================
Comment at: docs/ld.lld.1:390
 .Pp
+.It Fl --pac-plt
+AArch64 only, use pointer authentication in PLT.
----------------
`.It Fl -pac-plt`


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

https://reviews.llvm.org/D62609





More information about the llvm-commits mailing list