Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / gnu-property-err.s
blobc400484e8816d061e8a7f7743ed579426d62dbd0
1 # REQUIRES: aarch64
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
23 #--- 1.s
24 .section ".note.gnu.property", "a"
25 .long 4
26 .long 17 // n_descsz too long
27 .long 5 // NT_GNU_PROPERTY_TYPE_0
28 .asciz "GNU"
30 .long 0xc0000000 // GNU_PROPERTY_AARCH64_FEATURE_1_AND
31 .long 4 // pr_datasz
32 .long 1 // GNU_PROPERTY_AARCH64_FEATURE_1_BTI
33 .long 0
35 #--- 2.s
36 .section ".note.gnu.property", "a"
37 .long 4
38 .long 16 // n_descsz
39 .long 5 // NT_GNU_PROPERTY_TYPE_0
40 .asciz "GNU"
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
45 .long 0
47 #--- 3.s
48 .section ".note.gnu.property", "a"
49 .long 4
50 .long 8 // n_descsz
51 .long 5 // NT_GNU_PROPERTY_TYPE_0
52 .asciz "GNU"
54 .long 0xc0000000 // GNU_PROPERTY_AARCH64_FEATURE_1_AND
55 .long 0 // pr_datasz too short