-
Notifications
You must be signed in to change notification settings - Fork 5k
/
Copy pathModuleHeaders.h
65 lines (54 loc) · 2.13 KB
/
ModuleHeaders.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// Please keep the data structures in this file in sync with the managed version at
// src/Common/src/Internal/Runtime/ModuleHeaders.cs
// src/coreclr/inc/readytorun.h
struct ReadyToRunHeaderConstants
{
static const uint32_t Signature = 0x00525452; // 'RTR'
static const uint32_t CurrentMajorVersion = 13;
static const uint32_t CurrentMinorVersion = 1;
};
struct ReadyToRunHeader
{
uint32_t Signature; // ReadyToRunHeaderConstants.Signature
uint16_t MajorVersion;
uint16_t MinorVersion;
uint32_t Flags;
uint16_t NumberOfSections;
uint8_t EntrySize;
uint8_t EntryType;
// Array of sections follows.
};
//
// ReadyToRunSectionType IDs are used by the runtime to look up specific global data sections
// from each module linked into the final binary. New sections should be added at the bottom
// of the enum and deprecated sections should not be removed to preserve ID stability.
//
// Eventually this will be reconciled with ReadyToRunSectionType from
// https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/readytorun.h
//
enum class ReadyToRunSectionType
{
StringTable = 200,
GCStaticRegion = 201,
ThreadStaticRegion = 202,
// unused = 203,
TypeManagerIndirection = 204,
EagerCctor = 205,
FrozenObjectRegion = 206,
// 207 is unused - it was used by GCStaticDesc
ThreadStaticOffsetRegion = 208,
// 209 is unused - it was used by ThreadStaticGCDescRegion
// 210 is unused - it was used by ThreadStaticIndex
// 211 is unused - it was used by LoopHijackFlag
ImportAddressTables = 212,
// Sections 300 - 399 are reserved for RhFindBlob backwards compatibility
ReadonlyBlobRegionStart = 300,
ReadonlyBlobRegionEnd = 399,
};
enum class ModuleInfoFlags
{
HasEndPointer = 0x1,
};