28 lines · plain
1// REQUIRES: x86-registered-target2// RUN: %clang --target=x86_64-pc-linux -fcf-protection -include cet.h -c %s -o - | llvm-readelf -n - | FileCheck %s3// RUN: %clang --target=x86_64-pc-linux -include cet.h -c %s -o - | llvm-readelf -S - | FileCheck %s --check-prefixes=NOCET4// RUN: %clang --target=x86_64-pc-linux -include cet.h -S %s -o - | FileCheck %s --check-prefixes=NOENDBR5// RUN: %clang --target=x86_64-pc-linux -fcf-protection -include cet.h -S %s -o - | FileCheck %s --check-prefixes=ENDBR646 7// RUN: %clang --target=i386-pc-linux -fcf-protection -include cet.h -c %s -o - | llvm-readelf -n - | FileCheck %s8// RUN: %clang --target=i386-pc-linux -include cet.h -c %s -o - | llvm-readelf -S - | FileCheck %s --check-prefixes=NOCET9// RUN: %clang --target=i386-pc-linux -include cet.h -S %s -o - | FileCheck %s --check-prefixes=NOENDBR10// RUN: %clang --target=i386-pc-linux -fcf-protection -include cet.h -S %s -o - | FileCheck %s --check-prefixes=ENDBR3211 12// CHECK: IBT, SHSTK13 14// NOCET: Section Headers15// NOCET-NOT: .note.gnu.property16 17// NOENDBR: foo18// NOENDBR-NOT: endbr19 20// ENDBR64: endbr6421// ENDBR32: endbr3222 .text23 .globl foo24 .type foo, @function25foo:26 _CET_ENDBR27 ret28