[PATCH] D118052: [X86] Fix CodeGen Module Flag for -mibt-seal
Joao Moreira via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 3 14:29:20 PST 2022
joaomoreira planned changes to this revision.
joaomoreira added inline comments.
Herald added a project: All.
================
Comment at: clang/test/CodeGen/X86/x86-cf-protection.c:4
// RUN: %clang -target i386-unknown-unknown -x c -E -dM -o - -fcf-protection=full %s | FileCheck %s --check-prefix=FULL
+// RUN: %clang -target i386-unknown-unknown -o - -emit-llvm -S -fcf-protection=branch -mibt-seal -flto %s | FileCheck %s --check-prefix=IBTSEAL
----------------
pengfei wrote:
> Is `-flto` is required?
Yes, we can only suppress ENDBR if we are sure the given function is not address taken in all other translation units.
================
Comment at: clang/test/CodeGen/X86/x86-cf-protection.c:9-10
// FULL: #define __CET__ 3
+// IBTSEAL: "cf-protection-branch", i32 1
+// IBTSEAL: "ibt-seal", i32 1
void foo() {}
----------------
pengfei wrote:
> Can we add another RUN without `-mibt-seal` amd check no such flags?
Sure, I'll work on this try to track the possible bug mentioned by @aaron.ballman, then I'll update the diff.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118052/new/
https://reviews.llvm.org/D118052
More information about the cfe-commits
mailing list