[PATCH] D59278: [WebAssembly] Apply data relocations at runtime in shared objects
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 14:50:36 PDT 2019
ruiu added inline comments.
================
Comment at: lld/wasm/Driver.cpp:283
+ if (!Arg) {
+ if (Args.hasArg(OPT_relocatable))
+ return "";
----------------
Is the combination of `--entry` and `--relocatable` valid? Maybe we should reject that combination in the driver?
================
Comment at: lld/wasm/InputChunks.cpp:296
+// not known at static link time.
+void InputSegment::generateRelocationCode(raw_ostream &OS) const {
+ int32_t SegmentVA = OutputSeg->StartVA + OutputSegmentOffset;
----------------
Instead of creating a table for the run-time loader to fix these addresses, do we generate code in the linker to do it as part of process initialization?
================
Comment at: lld/wasm/InputChunks.cpp:297
+void InputSegment::generateRelocationCode(raw_ostream &OS) const {
+ int32_t SegmentVA = OutputSeg->StartVA + OutputSegmentOffset;
+ for (const WasmRelocation &Rel : Relocations) {
----------------
Should be uint32_t?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59278/new/
https://reviews.llvm.org/D59278
More information about the llvm-commits
mailing list