[lld] [llvm] [LLD][COFF] Add support for ARM64EC entry thunks. (PR #88132)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 02:48:49 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
----------------
mstorsjo wrote:
I'm curious - why is it relevant for the entry thunk that the function is a COMDAT symbol? (Edit: After looking at more of the code, I realize that this is because we need space to add the offset value before - for non-COMDAT, the section chunk contains multiple functions, and we can't inject the offset right before the function.)
https://github.com/llvm/llvm-project/pull/88132
More information about the llvm-commits
mailing list