[WebAssembly] Apply data relocations at runtime in shared objects
commitf9432450dd6c1d73796075225d79dec05de8024d
authorSam Clegg <sbc@chromium.org>
Thu, 4 Apr 2019 18:40:51 +0000 (4 18:40 +0000)
committerSam Clegg <sbc@chromium.org>
Thu, 4 Apr 2019 18:40:51 +0000 (4 18:40 +0000)
tree14b5f5a853833b65ff17d6cad1d6e0adbbb6a939
parentf3a823c16205a1b36285d4a51b3a2771ea814415
[WebAssembly] Apply data relocations at runtime in shared objects

See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md

Data section relocations in wasm shared libraries are applied by the
library itself at static constructor time.  This change adds a new
synthetic function that applies relocations to relevant memory locations
on startup.

Differential Revision: https://reviews.llvm.org/D59278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357715 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/BinaryFormat/Wasm.h