[lld][WebAssembly] Fix memory size in dylink section for -pie exectuables
authorSam Clegg <sbc@chromium.org>
Tue, 27 Oct 2020 19:46:07 +0000 (12:46 -0700)
committerSam Clegg <sbc@chromium.org>
Tue, 27 Oct 2020 23:05:52 +0000 (16:05 -0700)
commit84129150ce82894e185c084f2eaec05f4c03dd4c
treef724044024b0ba4f1d57424c3079f7bda407eb9c
parentf6c9f6eccda44a1fa5a57652a73f9ebf6595f5a6
[lld][WebAssembly] Fix memory size in dylink section for -pie exectuables

This field to represents the amount of static data needed by
an dynamic library or executable it should not include things
like heap or stack areas, which in the case of `-pie` are
not determined until runtime (e.g. __stack_pointer is imported).

Differential Revision: https://reviews.llvm.org/D90261
lld/test/wasm/pie.ll
lld/wasm/Writer.cpp