[llvm-branch-commits] [lld] ELF: Introduce R_AARCH64_FUNCINIT64 relocation type. (PR #133531)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 28 00:53:32 PDT 2025
================
@@ -0,0 +1,19 @@
+# REQUIRES: aarch64
+
+# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-readelf -s -r %t | FileCheck %s
+# RUN: ld.lld %t.o -o %t -pie
+# RUN: llvm-readelf -s -r %t | FileCheck %s
+# RUN: not ld.lld %t.o -o %t -shared 2>&1 | FileCheck --check-prefix=ERR %s
+
+.data
+# CHECK: R_AARCH64_IRELATIVE [[FOO:[0-9a-f]*]]
+# ERR: relocation R_AARCH64_FUNCINIT64 cannot be used against preemptible symbol 'foo'
+.8byte foo at FUNCINIT
----------------
MaskRay wrote:
Porting my RISC-V change from `@gotpcrel` to %gotpcrel(...) should be straightforward. I'd like to get the assembler change for `%funcinit` done now rather than postponing it, so it doesn't fall by the wayside.
Created #155776
https://github.com/llvm/llvm-project/pull/133531
More information about the llvm-branch-commits
mailing list