[PATCH] D96659: [WebAssembly] Add new relocation for location relative data

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 14:15:14 PST 2021


sbc100 added a comment.

I don't have any more objections myself.  @sunfish , WDYT of this addition?   My feeling is that if it helps swift then its probably worth adding.



================
Comment at: lld/test/wasm/reloc-relative.s:3
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
+# RUN: wasm-ld --no-entry --no-gc-sections --allow-undefined -fatal-warnings -o %t.wasm %t.o %t.hello32.o
+# RUN: obj2yaml %t.wasm | FileCheck %s
----------------
Do you need `--allow-undefined` here?


================
Comment at: lld/test/wasm/reloc-relative.s:29
+bar:
+  .int32 hello_str - bar
+  .size bar, 4
----------------
How does this not trigger the `can not be placed in a different section` error in the object writer?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96659/new/

https://reviews.llvm.org/D96659



More information about the llvm-commits mailing list