3a895e28b4
When writing out current PE contents only write data up to `sectionTable.offsetEnd` because that is the offset used to compute location of the snapshot section and there might be a padding between `offsetEnd` and the actual end of the file. This was revealed when compiling AOT runtime with ASAN enabled which slightly shifted sections in the PE file and introduced a gap. TEST=manually internally Change-Id: I532bc66fe5ac993c2214c22b50013e1a16c3f7f1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393841 Commit-Queue: Slava Egorov <vegorov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>