Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLD][COFF] Add test for hybrid patchable thunks on ARM64X (NFC) #126135

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lld/test/COFF/arm64ec-patchable-thunks.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec-patchable.s -o arm64e
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec-alias.s -o arm64ec-alias.obj
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows test-sec.s -o test-sec.obj
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj
RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o loadconfig-arm64.obj

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

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


RUN: lld-link -out:testx.dll -machine:arm64x arm64ec-patchable.obj test-sec.obj \
RUN: loadconfig-arm64.obj loadconfig-arm64ec.obj -dll -noentry
RUN: llvm-objdump -d testx.dll | FileCheck -check-prefix=PATCH-DISASM %s
RUN: llvm-readobj --coff-load-config testx.dll | FileCheck -check-prefix=PATCH-CHPE %s


RUN: lld-link -out:testx2.dll -machine:arm64x arm64ec-alias.obj loadconfig-arm64.obj \
RUN: loadconfig-arm64ec.obj -dll -noentry
RUN: llvm-objdump -d testx2.dll | FileCheck -check-prefix=PATCH-DISASM %s
RUN: llvm-readobj --coff-load-config testx2.dll | FileCheck -check-prefix=PATCH-CHPE %s


#--- arm64ec-patchable.s
.section ".text", "x", discard, "#patchable_func$hp_target"
.globl "#patchable_func$hp_target"
Expand Down