Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
bss_relocs.h
Go to the documentation of this file.
1// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_BSS_RELOCS_H_
6#define RUNTIME_VM_BSS_RELOCS_H_
7
9
10namespace dart {
11class Thread;
12
13class BSS : public AllStatic {
14 public:
15 // Entries found in both the VM and isolate BSS come first. Each has its own
16 // portion of the BSS segment, so just the indices are shared, not the values
17 // stored at the index.
18 enum class Relocation : intptr_t {
19 DRT_GetFfiCallbackMetadata, // TODO(https://dartbug.com/52579): Remove.
20 DRT_ExitTemporaryIsolate, // TODO(https://dartbug.com/52579): Remove.
22
23 // We don't have any isolate group specific entries at the moment.
25 };
26
27 static constexpr intptr_t kVmEntryCount =
28 static_cast<intptr_t>(Relocation::EndOfVmEntries);
29
30 static constexpr intptr_t kIsolateGroupEntryCount =
31 static_cast<intptr_t>(Relocation::EndOfIsolateGroupEntries);
32
33 static constexpr intptr_t RelocationIndex(Relocation reloc) {
34 return static_cast<intptr_t>(reloc);
35 }
36
37 static void Initialize(Thread* current, uword* bss, bool vm);
38
39 // Currently only used externally by LoadedElf::ResolveSymbols() to set the
40 // relocated address without changing the embedder interface.
41 static void InitializeBSSEntry(BSS::Relocation relocation,
42 uword new_value,
43 uword* bss_start);
44};
45
46} // namespace dart
47
48#endif // RUNTIME_VM_BSS_RELOCS_H_
static constexpr intptr_t kIsolateGroupEntryCount
Definition bss_relocs.h:30
static constexpr intptr_t kVmEntryCount
Definition bss_relocs.h:27
static constexpr intptr_t RelocationIndex(Relocation reloc)
Definition bss_relocs.h:33
static void Initialize(Thread *current, uword *bss, bool vm)
Definition bss_relocs.cc:30
static void InitializeBSSEntry(BSS::Relocation relocation, uword new_value, uword *bss_start)
Definition bss_relocs.cc:12
uintptr_t uword
Definition globals.h:501