Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
pe.h
Go to the documentation of this file.
1// Copyright (c) 2022, 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_PLATFORM_PE_H_
6#define RUNTIME_PLATFORM_PE_H_
7
8#include <platform/globals.h>
9
10namespace dart {
11
12namespace pe {
13
14#pragma pack(push, 1)
15
16static constexpr intptr_t kPEOffsetOffset = 0x3c;
17static const char kPEMagic[] = {'P', 'E', '\0', '\0'};
18
20 uint16_t machine;
21 uint16_t num_sections;
22 uint32_t timestamp;
24 uint32_t num_symbols;
27};
28
29// Does not include the BaseOfData field for PE32 (not PE32+) files, but we
30// don't need that to load a snapshot out of a PE file.
41
42static constexpr uint16_t kPE32Magic = 0x10b;
43static constexpr uint16_t kPE32PlusMagic = 0x20b;
44
45static constexpr intptr_t kCoffSectionNameSize = 8;
46
59
60#pragma pack(pop)
61
62} // namespace pe
63
64} // namespace dart
65
66#endif // RUNTIME_PLATFORM_PE_H_
static const char kPEMagic[]
Definition pe.h:17
static constexpr intptr_t kPEOffsetOffset
Definition pe.h:16
static constexpr uint16_t kPE32Magic
Definition pe.h:42
static constexpr intptr_t kCoffSectionNameSize
Definition pe.h:45
static constexpr uint16_t kPE32PlusMagic
Definition pe.h:43
uint16_t optional_header_size
Definition pe.h:25
uint32_t num_symbols
Definition pe.h:24
uint32_t symbol_table_offset
Definition pe.h:23
uint16_t num_sections
Definition pe.h:21
uint16_t characteristics
Definition pe.h:26
uint32_t entry_point_address
Definition pe.h:38
uint32_t uninitialized_data_size
Definition pe.h:37
uint32_t initialized_data_size
Definition pe.h:36
char name[kCoffSectionNameSize]
Definition pe.h:48
uint32_t relocations_offset
Definition pe.h:53
uint16_t num_line_numbers
Definition pe.h:56
uint32_t line_numbers_offset
Definition pe.h:54