[lld] [lld][WebAssembly] Fix non-pie dynamic-linking executable (PR #108146)
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 06:45:25 PDT 2024
================
@@ -0,0 +1,41 @@
+# 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
+# RUN: obj2yaml %t.wasm | FileCheck %s
+# RUN: llvm-objdump -d --no-show-raw-insn --no-leading-addr %t.wasm | FileCheck %s --check-prefixes DIS
+
+ .functype ret32 (f32) -> (i32)
+ .functype _start () -> ()
+ .globl _start
+ .type _start, at function
+_start:
+ .functype _start () -> ()
+ i32.const f_p
+ drop
+ end_function
+
+ .section .data.f_p,"",@
+ .globl f_p
----------------
sbc100 wrote:
Does this need to be global symbol? i.e. can you remove this line?
https://github.com/llvm/llvm-project/pull/108146
More information about the llvm-commits
mailing list