6f83a5ff9b
For proper crashpad integration, we need to generate a build ID, as the build ID generated by crashpad if there is not one will be a simple XOR of the first text page, which rarely changes for Dart snapshots. Assembly snapshots already have a build ID included by the assembler, so we currently only do this for ELF snapshots. Currently the build ID is a 128-bit hash value that is four separate 32-bit hash values concatenated together. Those hash values come from the contents of the VM and isolate .text and .rodata sections. This change also contains work to separate out the concepts of sections and segments in the ELF builder. Now, consecutive allocated sections with the same write and execute flags are combined into a single PT_LOAD segment when possible, which reduces the padding needed to ensure that segments start on page boundaries in ELF snapshots. Bug: https://github.com/dart-lang/sdk/issues/42020 Change-Id: I42a837dae665a3902d881b8d151b49ede87d6c67 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150625 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
17 lines
726 B
Dart
17 lines
726 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// The section name in which the build ID is stored as a note.
|
|
const String buildIdSectionName = ".note.gnu.build-id";
|
|
// The type of a build ID note.
|
|
const int buildIdNoteType = 3;
|
|
// The name of a build ID note.
|
|
const String buildIdNoteName = "GNU";
|
|
|
|
// The dynamic symbol name for the VM instructions section.
|
|
const String vmSymbolName = "_kDartVmSnapshotInstructions";
|
|
|
|
// The dynamic symbol name for the isolate instructions section.
|
|
const String isolateSymbolName = "_kDartIsolateSnapshotInstructions";
|