diff options
author | Sam Clegg <sbc@chromium.org> | 2018-02-07 03:04:53 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-02-07 03:04:53 +0000 |
commit | fc6d0f5ac61bbece8936baad3624e1480d372cd9 (patch) | |
tree | c9527a75a490c918b9637ec30ac23a24961afc9e /lld/wasm/Driver.cpp | |
parent | d94a917a65e0179c32685272cd3d2ac3ad9b74b9 (diff) |
[WebAssembly] Add __data_end link-sythentic symbol.
This is similar to _end (See https://linux.die.net/man/3/edata for more)
but using our own unique name since our use cases will most likely be
different and we want to keep our options open WRT to memory layout.
This change will allow is to remove the DataSize from the linking
metadata section which is currently being used by emscripten to derive
the end of the data.
Differential Revision: https://reviews.llvm.org/D42867
Diffstat (limited to 'lld/wasm/Driver.cpp')
-rw-r--r-- | lld/wasm/Driver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index c3884381089..db8ece81e90 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -304,6 +304,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { WasmSym::StackPointer = Symtab->addDefinedGlobal("__stack_pointer"); WasmSym::HeapBase = Symtab->addDefinedGlobal("__heap_base"); WasmSym::DsoHandle = Symtab->addDefinedGlobal("__dso_handle"); + WasmSym::DataEnd = Symtab->addDefinedGlobal("__data_end"); } createFiles(Args); |