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

Yuta Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 18:35:23 PST 2021


kateinoigakukun added inline comments.


================
Comment at: lld/wasm/InputFiles.cpp:183
+        wasmObj->dataSegments()[sym.Info.DataRef.Segment];
+    return segment.Data.Offset.Value.Int32;
+  }
----------------
sbc100 wrote:
> Is this correct?   It looks like we are expecting the value written to the location to be the start of the segment containing the symbol?  (Maybe this works because we default to `-fdata-sections`?)
That was incorrect 😅  I fixed it and added tests to catch this bug. Thanks.


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