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

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 23:07:55 PDT 2024


================
@@ -0,0 +1,35 @@
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.lib.o %p/Inputs/lib.s
+# RUN: wasm-ld -m wasm32 --experimental-pic -shared --no-entry %t.lib.o -o %t.lib.so
+# RUN: llvm-mc -filetype=obj -mattr=+reference-types -triple=wasm32-unknown-unknown -o %t.o %s
+# RUN: wasm-ld -m wasm32 --features=mutable-globals -Bdynamic --export-table --growable-table --export-memory --export=__stack_pointer --export=__heap_base --export=__heap_end --entry=_start %t.o %t.lib.so -o %t.wasm
----------------
sbc100 wrote:

Can you remove any link flags that you don't need here?  e.g. all of the `--export` flags and the `--entry` flag?

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


More information about the llvm-commits mailing list