From fc6d0f5ac61bbece8936baad3624e1480d372cd9 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 7 Feb 2018 03:04:53 +0000 Subject: [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 --- lld/wasm/Driver.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lld/wasm/Driver.cpp') 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 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); -- cgit v1.2.3