[lld] [lld][WebAssembly] Fix non-pie dynamic-linking executable (PR #108146)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 08:43:36 PDT 2024


================
@@ -0,0 +1,29 @@
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.lib.o %p/Inputs/ret32.s
+# RUN: wasm-ld -m wasm32 --experimental-pic -shared --no-entry %t.lib.o -o %t.lib.so
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
+# RUN: wasm-ld -m wasm32 -Bdynamic %t.o %t.lib.so -o %t.wasm
----------------
sbc100 wrote:

Just to confirm, this effectively generates a non-PIC output?   And `ctx.isPic` not set?

I wonder if we can confirm this this test somehow?   Perhaps its enough that we successfully use `i32.const  f_p` (which would not work if the output was PIC, right?) instead of `i32.const   f_p at MBREL` 

https://github.com/llvm/llvm-project/pull/108146


More information about the llvm-commits mailing list