[PATCH] D65980: [WebAssembly][lld] control __data_end export with config->shared
Guanzhong Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 15:20:39 PDT 2019
quantum created this revision.
quantum added reviewers: tlively, sbc100.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
Herald added a project: LLVM.
Emscripten expects `__data_end` to show up in PIC code as long as it's not
linked with `--shared`.
Currently, Emscripten breaks with latest LLVM because `__data_end` is controlled
by `config->isPic` instead of `config->shared`.`
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D65980
Files:
lld/wasm/Driver.cpp
Index: lld/wasm/Driver.cpp
===================================================================
--- lld/wasm/Driver.cpp
+++ lld/wasm/Driver.cpp
@@ -527,8 +527,11 @@
if (!config->relocatable)
WasmSym::dsoHandle = symtab->addOptionalDataSymbol("__dso_handle");
- if (!config->isPic) {
+ if (!config->shared) {
WasmSym::dataEnd = symtab->addOptionalDataSymbol("__data_end");
+ }
+
+ if (!config->isPic) {
WasmSym::globalBase = symtab->addOptionalDataSymbol("__global_base");
WasmSym::heapBase = symtab->addOptionalDataSymbol("__heap_base");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65980.214247.patch
Type: text/x-patch
Size: 571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190808/6a20c981/attachment.bin>
More information about the llvm-commits
mailing list