[lld] r368361 - [WebAssembly][lld] control __data_end export with config->shared
Guanzhong Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 15:40:04 PDT 2019
Author: quantum
Date: Thu Aug 8 15:40:04 2019
New Revision: 368361
URL: http://llvm.org/viewvc/llvm-project?rev=368361&view=rev
Log:
[WebAssembly][lld] control __data_end export with config->shared
Summary:
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`.`
Reviewers: tlively, sbc100
Reviewed By: sbc100
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65980
Modified:
lld/trunk/wasm/Driver.cpp
Modified: lld/trunk/wasm/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Driver.cpp?rev=368361&r1=368360&r2=368361&view=diff
==============================================================================
--- lld/trunk/wasm/Driver.cpp (original)
+++ lld/trunk/wasm/Driver.cpp Thu Aug 8 15:40:04 2019
@@ -527,8 +527,10 @@ static void createOptionalSymbols() {
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");
}
More information about the llvm-commits
mailing list