Skip to content

Commit c8b2ba7

Browse files
authored
[LLD][COFF] Add test for hybrid patchable thunks on ARM64X (NFC) (#126135)
1 parent 0227396 commit c8b2ba7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lld/test/COFF/arm64ec-patchable-thunks.test

+13
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec-patchable.s -o arm64e
55
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec-alias.s -o arm64ec-alias.obj
66
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows test-sec.s -o test-sec.obj
77
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj
8+
RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o loadconfig-arm64.obj
89

910
RUN: lld-link -out:test.dll -machine:arm64ec arm64ec-patchable.obj test-sec.obj loadconfig-arm64ec.obj -dll -noentry
1011

@@ -59,6 +60,18 @@ RUN: not lld-link -out:test4.dll -machine:arm64ec test-sec.obj loadconfig-arm64e
5960
ERR: error: undefined symbol: EXP+#patchable_func
6061

6162

63+
RUN: lld-link -out:testx.dll -machine:arm64x arm64ec-patchable.obj test-sec.obj \
64+
RUN: loadconfig-arm64.obj loadconfig-arm64ec.obj -dll -noentry
65+
RUN: llvm-objdump -d testx.dll | FileCheck -check-prefix=PATCH-DISASM %s
66+
RUN: llvm-readobj --coff-load-config testx.dll | FileCheck -check-prefix=PATCH-CHPE %s
67+
68+
69+
RUN: lld-link -out:testx2.dll -machine:arm64x arm64ec-alias.obj loadconfig-arm64.obj \
70+
RUN: loadconfig-arm64ec.obj -dll -noentry
71+
RUN: llvm-objdump -d testx2.dll | FileCheck -check-prefix=PATCH-DISASM %s
72+
RUN: llvm-readobj --coff-load-config testx2.dll | FileCheck -check-prefix=PATCH-CHPE %s
73+
74+
6275
#--- arm64ec-patchable.s
6376
.section ".text", "x", discard, "#patchable_func$hp_target"
6477
.globl "#patchable_func$hp_target"

0 commit comments

Comments
 (0)