[lld] [lld] Add infrastructure for handling RISCV vendor-specific relocations. (PR #159987)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 14 11:19:04 PDT 2025
================
@@ -0,0 +1,16 @@
+# RUN: llvm-mc -triple riscv32 %s -filetype=obj -o %t.o
+# RUN: not ld.lld -pie %t.o -o /dev/null 2>&1 | FileCheck %s
+
+ .option exact
+
+ .global TARGET
+TARGET:
+ nop
+
+.global INVALID_VENDOR
+.reloc 1f, R_RISCV_VENDOR, INVALID_VENDOR+0
+.reloc 1f, R_RISCV_CUSTOM255, TARGET
+1:
+ nop
+
+# CHECK: error: {{.*}} unknown vendor-specific relocation (255) in vendor namespace "INVALID_VENDOR" against symbol TARGET
----------------
lenary wrote:
New line at end of file.
https://github.com/llvm/llvm-project/pull/159987
More information about the llvm-commits
mailing list