[lld][WebAssembly] Perform data relocations during start function
commitec47dba1c8a2c89ae3ee3cfa052f69dc5fda153d
authorSam Clegg <sbc@chromium.org>
Sat, 15 Jan 2022 23:33:02 +0000 (15 15:33 -0800)
committerSam Clegg <sbc@chromium.org>
Tue, 18 Jan 2022 22:08:42 +0000 (18 14:08 -0800)
treea3a2f8e8bb0a237d5a0eed5fbf9754f10a6fca74
parent64de0064f315f57044294879d9ff4eacb454d45b
[lld][WebAssembly] Perform data relocations during start function

We already perform memory initialization and apply global relocations
during start.  It makes sense to performs data relocations too.  I think
the reason we were not doing this already is solely historical.

Differential Revision: https://reviews.llvm.org/D117412
lld/test/wasm/data-segments.ll
lld/test/wasm/pie.ll
lld/wasm/Writer.cpp