[lld] [lld][WebAssembly] Report Unsupported PIC Relocations as Errors (PR #104926)
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 09:50:41 PDT 2024
================
@@ -0,0 +1,47 @@
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
+
+# RUN: not wasm-ld --experimental-pic -shared %t.o -o /dev/null 2>&1 | \
+# RUN: FileCheck %s
+
+# RUN: not wasm-ld --experimental-pic -shared %t.o -o /dev/null --unresolved-symbols=report-all 2>&1 | \
+# RUN: FileCheck %s
+
+# RUN: not wasm-ld --experimental-pic -shared %t.o -o /dev/null --warn-unresolved-symbols 2>&1 | \
+# RUN: FileCheck %s
+
+# RUN: not wasm-ld --experimental-pic -shared %t.o -o /dev/null --unresolved-symbols=ignore-all 2>&1 | \
+# RUN: FileCheck %s
+
+# RUN: not wasm-ld --experimental-pic -shared %t.o -o /dev/null --unresolved-symbols=import-dynamic 2>&1 | \
+# RUN: FileCheck %s
+
+.globaltype __memory_base, i32, immutable
+.globaltype __table_base, i32, immutable
----------------
sbc100 wrote:
Do you actually need `__memory_base` and `__table_base` at all to make this test work? Can you use do `i32.const external_func at TBREL` on its own without adding it to `__table_base`?
https://github.com/llvm/llvm-project/pull/104926
More information about the llvm-commits
mailing list