[PATCH] D100546: [ARM][AArch64] SLSHardening: make non-comdat thunks possible

Daniel Kiss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 06:02:05 PDT 2021


danielkiss marked 4 inline comments as done.
danielkiss added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:275
       Features.push_back("+harden-sls-blr");
+    if ((EnableRetBr || EnableBlr) && DisableComdat) {
+      Features.push_back("+harden-sls-nocomdat");
----------------
kristof.beyls wrote:
> I'm wondering if the '(EnableRetBr || EnableBlr)' condition is needed here?
> Just dropping it would make this code a little bit simpler.
> I'm assuming here of course that the semantics of the +harden-sls-comdat target feature is to not produce comdat sections in case any of the other sls-hardening target features would produce thunks.
> I agree this is a bit of a nit pick though.
the check is a bit overkill, the backend won't do anything anyway without the `EnableRetBr || EnableBlr`


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

https://reviews.llvm.org/D100546



More information about the llvm-commits mailing list