5#ifndef RUNTIME_VM_ELF_H_
6#define RUNTIME_VM_ELF_H_
10#if defined(DART_PRECOMPILER)
23#if defined(DART_TARGET_OS_LINUX) && defined(TARGET_ARCH_ARM64)
28#elif defined(DART_TARGET_OS_ANDROID) && defined(TARGET_ARCH_IS_64_BIT)
34#if defined(DART_PRECOMPILER)
52 Elf(Zone* zone, BaseWriteStream*
stream,
Type type, Dwarf* dwarf =
nullptr);
56 bool IsStripped()
const {
return dwarf_ ==
nullptr; }
58 Zone* zone()
const {
return zone_; }
59 const Dwarf* dwarf()
const {
return dwarf_; }
60 Dwarf* dwarf() {
return dwarf_; }
61 const SymbolTable& symtab()
const {
62 ASSERT(symtab_ !=
nullptr);
65 const SectionTable& section_table()
const {
return *section_table_; }
71 intptr_t section_offset;
72 intptr_t source_label;
73 intptr_t source_offset;
74 intptr_t target_label;
75 intptr_t target_offset;
79 static constexpr intptr_t kSelfRelative = -1;
82 static constexpr intptr_t kSnapshotRelative = -2;
84 Relocation(
size_t size_in_bytes,
85 intptr_t section_offset,
86 intptr_t source_label,
87 intptr_t source_offset,
88 intptr_t target_label,
89 intptr_t target_offset)
90 : size_in_bytes(size_in_bytes),
91 section_offset(section_offset),
92 source_label(source_label),
93 source_offset(source_offset),
94 target_label(target_label),
95 target_offset(target_offset) {
97 ASSERT(source_label > 0 || source_label == kSelfRelative ||
98 source_label == kSnapshotRelative);
99 ASSERT(target_label > 0 || target_label == kSelfRelative ||
100 target_label == kSnapshotRelative);
115 SymbolData(
const char*
name,
127 static constexpr intptr_t kVmBssLabel = 5;
128 static constexpr intptr_t kIsolateBssLabel = 6;
129 static constexpr intptr_t kBuildIdLabel = 7;
131 void AddText(
const char*
name,
133 const uint8_t* bytes,
135 const ZoneGrowableArray<Relocation>* relocations,
136 const ZoneGrowableArray<SymbolData>* symbol);
137 void AddROData(
const char*
name,
139 const uint8_t* bytes,
141 const ZoneGrowableArray<Relocation>* relocations,
142 const ZoneGrowableArray<SymbolData>*
symbols);
147 static constexpr const char kBuildIdNoteName[] =
".note.gnu.build-id";
148 static constexpr const char kTextName[] =
".text";
149 static constexpr const char kDataName[] =
".rodata";
150 static constexpr const char kBssName[] =
".bss";
151 static constexpr const char kDynamicTableName[] =
".dynamic";
154 void GenerateBuildId();
155 void InitializeSymbolTables();
156 void FinalizeDwarfSections();
157 void FinalizeEhFrame();
158 void ComputeOffsets();
161 BaseWriteStream*
const unwrapped_stream_;
169 SectionTable*
const section_table_;
173 ProgramTable* program_table_ =
nullptr;
177 SymbolTable* symtab_ =
nullptr;
179 friend class SectionTable;
static constexpr intptr_t kPageSize
static constexpr intptr_t kElfPageSize
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size