[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / arm64ec-hybmp.s
blob5fc24d42507041e00bb2506b078a25f2dcf2b8cd
1 REQUIRES: aarch64
2 RUN: split-file %s %t.dir && cd %t.dir
4 #--- text-func.s
5 .text
6 .globl func
7 .p2align 2, 0x0
8 func:
9 mov w0, #1
10 ret
12 .section .wowthk$aa,"xr",discard,thunk
13 .globl thunk
14 .p2align 2
15 thunk:
16 ret
18 .section .hybmp$x,"yi"
19 .symidx func
20 .symidx thunk
21 .word 1 // entry thunk
23 // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows text-func.s -o text-func.obj
24 // RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll text-func.obj 2>&1 | FileCheck -check-prefix=FUNC-NON-COMDAT %s
25 // FUNC-NON-COMDAT: error: non COMDAT symbol 'func' in hybrid map
27 #--- offset-func.s
28 .section .text,"xr",discard,func
29 // Add an instruction before func label to make adding entry thunk offset in the padding impossible.
30 mov w0, #2
31 .globl func
32 .p2align 2, 0x0
33 func:
34 mov w0, #1
35 ret
37 .section .wowthk$aa,"xr",discard,thunk
38 .globl thunk
39 .p2align 2
40 thunk:
41 ret
43 .section .hybmp$x,"yi"
44 .symidx func
45 .symidx thunk
46 .word 1 // entry thunk
48 // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows offset-func.s -o offset-func.obj
49 // RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll offset-func.obj 2>&1 | FileCheck -check-prefix=FUNC-NON-COMDAT %s
51 #--- undef-func.s
52 .section .wowthk$aa,"xr",discard,thunk
53 .globl thunk
54 .p2align 2
55 thunk:
56 ret
58 .section .hybmp$x,"yi"
59 .symidx func
60 .symidx thunk
61 .word 1 // entry thunk
63 // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows undef-func.s -o undef-func.obj
64 // RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll undef-func.obj 2>&1 | FileCheck -check-prefix=UNDEF-FUNC %s
65 // UNDEF-FUNC: error: undefined symbol: func
67 #--- undef-thunk.s
68 .section .text,"xr",discard,func
69 .globl func
70 .p2align 2, 0x0
71 func:
72 mov w0, #1
73 ret
75 .section .hybmp$x,"yi"
76 .symidx func
77 .symidx thunk
78 .word 1 // entry thunk
80 // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows undef-thunk.s -o undef-thunk.obj
81 // RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll undef-thunk.obj 2>&1 | FileCheck -check-prefix=UNDEF-THUNK %s
82 // UNDEF-THUNK: error: undefined symbol: thunk
84 #--- invalid-type.s
85 .section .text,"xr",discard,func
86 .globl func
87 .p2align 2, 0x0
88 func:
89 mov w0, #1
90 ret
92 .section .wowthk$aa,"xr",discard,thunk
93 .globl thunk
94 .p2align 2
95 thunk:
96 ret
98 .section .hybmp$x,"yi"
99 .symidx func
100 .symidx thunk
101 .word 3
103 // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows invalid-type.s -o invalid-type.obj
104 // RUN: lld-link -machine:arm64ec -dll -noentry -out:test.dll invalid-type.obj 2>&1 | FileCheck -check-prefix=INVALID-TYPE %s
105 // INVALID-TYPE: warning: Ignoring unknown EC thunk type 3
107 #--- invalid-size.s
108 .section .hybmp$x,"yi"
109 .symidx func
110 .symidx thunk
112 // RUN: llvm-mc -filetype=obj -triple=arm64ec-windows invalid-size.s -o invalid-size.obj
113 // RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll invalid-size.obj 2>&1 | FileCheck -check-prefix=INVALID-SIZE %s
114 // INVALID-SIZE: error: Invalid .hybmp chunk size 8