Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / arm64-win-error2.s
blob74a61dd020198f812d611d00bdf1544fe354bef5
1 ## Check that the sanity check for an inconsistent header works.
2 ## The first word contains the bad value for CodeWords, 0xf, which indicates
3 ## that we need 0x11110 << 2 = 120 bytes of space for the unwind codes.
4 ## It follows that the .xdata section is badly formed as only 8 bytes are
5 ## allocated for the unwind codes.
7 // REQUIRES: aarch64-registered-target
8 // RUN: llvm-mc -filetype=obj -triple aarch64-windows %s -o - \
9 // RUN: | not llvm-readobj --unwind - 2>&1 | FileCheck %s
11 // CHECK: LLVM ERROR: Malformed unwind data
13 .text
14 .globl "?func@@YAHXZ"
15 .p2align 3
16 "?func@@YAHXZ":
17 sub sp,sp,#0x10
18 stp x19,lr,[sp]
19 sub sp,sp,#0x1F0
20 mov w19,w0
21 bl "?func2@@YAXXZ"
22 cmp w19,#2
23 ble .LBB0_1
24 bl "?func2@@YAHXZ"
25 add sp,sp,#0x1F0
26 ldp x19,lr,[sp]
27 add sp,sp,#0x10
28 ret
29 .LBB0_1:
30 mov x0,sp
31 bl "?func3@@YAHPEAH@Z"
32 add sp,sp,#0x1F0
33 ldp x19,lr,[sp]
34 add sp,sp,#0x10
35 ret
37 .section .pdata,"dr"
38 .long "?func@@YAHXZ"@IMGREL
39 .long "$unwind$func@@YAHXZ"@IMGREL
42 .section .xdata,"dr"
43 "$unwind$func@@YAHXZ":
44 .p2align 3
45 .long 0xf0800012
46 .long 0x8
47 .long 0xe
48 .long 0x100d61f
49 .long 0xe3e3e3e4