[PATCH] D117412: [lld][WebAssembly] Perform data relocations during start function

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 21:41:44 PST 2022


tlively added a comment.

Who was previously responsible for applying the data relocs? If it was Emscripten runtime code, does that mean this change will have to land alongside the corresponding Emscripten change? Is there anyone who would be broken by this ABI break who we should notify?



================
Comment at: lld/wasm/Writer.cpp:1266-1273
+      if (!WasmSym::initMemory) {
+        // When initMemory is present it calls applyDataRelocs
+        if (WasmSym::applyDataRelocs) {
+          writeU8(os, WASM_OPCODE_CALL, "CALL");
+          writeUleb128(os, WasmSym::applyDataRelocs->getFunctionIndex(),
+                       "function index");
+        }
----------------
Can we add a test that exercises this case?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117412



More information about the llvm-commits mailing list