brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 8eeed74 Raw
27 lines · plain
1// REQUIRES: aarch64-registered-target2 3// When -mmark-bti-property is passed the generated file object gets BTI marking.4// RUN: %clang -target arm64-linux-none -mmark-bti-property -c -o - %s | llvm-readobj -n - | FileCheck -check-prefix=CHECK  -check-prefix=CHECK_GEN %s5// RUN: %clang -target arm64-linux-none -DNOTE_PRESENT -c %s -o - | llvm-readobj -n - | FileCheck -check-prefix=CHECK  -check-prefix=CHECK_PRESET %s6// RUN: %clang -target arm64-linux-none -mmark-bti-property -DNOTE_PRESENT -c %s -o - | llvm-readobj -n - | FileCheck -check-prefix=CHECK  -check-prefix=CHECK_PRESET %s7// RUN: %clang -target arm64-linux-none -mmark-bti-property -DNOTE_PRESENT -c %s -o - 2>&1 |  FileCheck -check-prefix=CHECK_WARNING %s8//9// CHECK_WARNING: The .note.gnu.property is not emitted because it is already present.10// CHECK: Name: .note.gnu.property11// CHECK: Type: NT_GNU_PROPERTY_TYPE_012// CHECK_GEN: aarch64 feature: BTI13// CHECK_PRESET: aarch64 feature: BTI, PAC14 15#ifdef NOTE_PRESENT16  .section .note.gnu.property, "a";17  .balign 8;18  .long 4;19  .long 0x10;20  .long 0x521  .asciz "GNU"22  .long 0xc000000023  .long 424  .long 325  .long 026#endif27