[lld] [llvm] [LLD][COFF] Add support for ARM64EC entry thunks. (PR #88132)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 08:26:16 PDT 2024
================
@@ -0,0 +1,113 @@
+REQUIRES: aarch64
+RUN: split-file %s %t.dir && cd %t.dir
+
+#--- text-func.s
+ .text
+ .globl func
+ .p2align 2, 0x0
+func:
+ mov w0, #1
+ ret
+
+ .section .wowthk$aa,"xr",discard,thunk
+ .globl thunk
+ .p2align 2
+thunk:
+ ret
+
+ .section .hybmp$x,"yi"
+ .symidx func
+ .symidx thunk
+ .word 1
+
+// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows text-func.s -o text-func.obj
+// RUN: not lld-link -machine:arm64ec -dll -noentry -out:test.dll text-func.obj 2>&1 | FileCheck -check-prefix=FUNC-NON-COMDAT %s
+// FUNC-NON-COMDAT: error: non COMDAT symbol 'func' in hybrid map
+
+#--- offset-func.s
+ .section .text,"xr",discard,func
+ mov w0, #2
+ .globl func
+ .p2align 2, 0x0
+func:
+ mov w0, #1
----------------
cjacek wrote:
I added a comment both here and in the code. It also clarifies why COMDATs are needed and adds more comments to tests.
Thanks for the review!
https://github.com/llvm/llvm-project/pull/88132
More information about the llvm-commits
mailing list