eff0832b0f
After writing the new PE header and original section contents of the dartaotruntime PE executable, pad to the expected file offset of the new section being added, not just to file alignment. Also fixes a case where the new section's file offset returned from appendSnapshotAndWrite could be incorrect if the header size changed, which causes the file offsets for all sections, including the new one, to be updated. TEST=pkg/dartdev/test/commands/compile_test.dart Change-Id: I060176f6771e9138f8d1a99590d455fc76bb573e Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-win-release-arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410720 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Tess Strickland <sstrickl@google.com>