Commit 298777c
[vm] Merge text and data sections in ELF snapshots.
To do this, BitsContainer is changed to be a more rope-like
representation of section portions. In addition to containing
most of the same information stored per-section previously, each
portion also has a section-relative offset that is calculated when
it is added. Thus, merging two compatible BitsContainer sections
is just adding the portions from the second to the first, tweaking
the section-relative offset for each.
Other changes in this CL:
* Create PseudoSections subclasses for the elf header, program
header table, and section header table, so we can treat them
more uniformly with the other parts of the ELF snapshot.
* We now only allocate as much BSS space in the snapshot as is needed
for any text sections in the snapshot, instead of always allocating
a big enough BSS space for both VM and isolate, even for deferred
snapshots where there is no VM isolate.
* We already separated segment and section alignment in previous CLs,
so the fact that our own ELF loader needs load segments to be
page-aligned no longer means that the sections within those segments
also needs to be. Thus, we align individual instructions sections to
kMaxObjectAlignment, like readonly data sections, since both hold a
single Image object. This removes unnecessary intra-section padding.
TEST=Tests that check DWARF information and trybots that use ELF
snapshots.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-dwarf-linux-product-x64-try
Change-Id: If0315c8b7b0f31481b676a8901f49cd3a44b5561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206365
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Tess Strickland <[email protected]>1 parent 20ba6af commit 298777c
File tree
5 files changed
+877
-694
lines changed- runtime
- bin
- vm
5 files changed
+877
-694
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
242 | | - | |
243 | | - | |
244 | 241 | | |
245 | 242 | | |
246 | 243 | | |
| |||
468 | 465 | | |
469 | 466 | | |
470 | 467 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | 468 | | |
480 | 469 | | |
481 | 470 | | |
482 | 471 | | |
483 | 472 | | |
484 | | - | |
485 | 473 | | |
486 | 474 | | |
487 | 475 | | |
| |||
0 commit comments