[PATCH] D63833: [wasm-ld] Add __global_base symbol to mark the value of --global-base
Guanzhong Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 12:41:32 PDT 2019
quantum marked 6 inline comments as done.
quantum added inline comments.
================
Comment at: lld/test/wasm/global-base.ll:3
+
+target triple = "wasm32-unknown-unknown"
+
----------------
sbc100 wrote:
> You could avoid creating a .ll file here maybe and simply make this a `.test` file (pure text) that compiles that simple `wasm/Inputs/start.ll` file.. then you could also drop the `--no-entry`
Done.
================
Comment at: lld/test/wasm/global-base.ll:5
+
+; RUN: wasm-ld -no-gc-sections --export=__global_base --export=__data_end --allow-undefined --no-entry -o %t.wasm %t.o
+; RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=CHECK-1024
----------------
sbc100 wrote:
> Do you need `--no-gc-sections` here?
Removed.
================
Comment at: lld/wasm/Writer.cpp:223
} else {
MemoryPtr = Config->GlobalBase;
log("mem: global base = " + Twine(Config->GlobalBase));
----------------
sbc100 wrote:
> Looks like we need to figure what to do with GlobalBase in the case of --stack-first. But that is somewhat independent of this change.
I agree.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63833/new/
https://reviews.llvm.org/D63833
More information about the llvm-commits
mailing list