2 # RUN: split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=aarch64 %t/1.s -o %t1.o
5 # RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1
7 # ERR1: error: {{.*}}.o:(.note.gnu.property+0x0): data is too short
9 # RUN: llvm-mc -filetype=obj -triple=aarch64 %t/2.s -o %t2.o
10 # RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2
11 # RUN: llvm-mc -filetype=obj -triple=aarch64_be %t/2.s -o %t2be.o
12 # RUN: not ld.lld %t2be.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2
14 # ERR2: error: {{.*}}.o:(.note.gnu.property+0x10): program property is too short
16 # RUN: llvm-mc -filetype=obj -triple=aarch64 %t/3.s -o %t3.o
17 # RUN: not ld.lld %t3.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR3
18 # RUN: llvm-mc -filetype=obj -triple=aarch64_be %t/3.s -o %t3be.o
19 # RUN: not ld.lld %t3be.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR3
21 # ERR3: error: {{.*}}.o:(.note.gnu.property+0x10): FEATURE_1_AND entry is too short
24 .section ".note.gnu.property", "a"
26 .long 17 // n_descsz too long
27 .long 5 // NT_GNU_PROPERTY_TYPE_0
30 .long 0xc0000000 // GNU_PROPERTY_AARCH64_FEATURE_1_AND
32 .long 1 // GNU_PROPERTY_AARCH64_FEATURE_1_BTI
36 .section ".note.gnu.property", "a"
39 .long 5 // NT_GNU_PROPERTY_TYPE_0
42 .long 0xc0000000 // GNU_PROPERTY_AARCH64_FEATURE_1_AND
43 .long 9 // pr_datasz too long
44 .long 1 // GNU_PROPERTY_AARCH64_FEATURE_1_BTI
48 .section ".note.gnu.property", "a"
51 .long 5 // NT_GNU_PROPERTY_TYPE_0
54 .long 0xc0000000 // GNU_PROPERTY_AARCH64_FEATURE_1_AND
55 .long 0 // pr_datasz too short