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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//! `FieldRva` table loader implementation.
//!
//! This module provides the [`crate::metadata::tables::fieldrva::loader::FieldRvaLoader`] responsible for loading and processing
//! `FieldRva` metadata table entries. The `FieldRva` table specifies Relative Virtual Addresses
//! (RVAs) for fields that have initial data stored in the PE file image.
//!
//! # Purpose
//! The `FieldRva` table is used for fields with static initial data:
//! - **Static field initialization**: Initial values for static fields
//! - **Constant data**: Read-only data embedded in the PE file
//! - **Global variables**: Module-level data with specific initial values
//! - **Interop data**: Native data structures embedded in managed assemblies
//! - **Resource data**: Binary data referenced by field definitions
//!
//! # RVA Resolution
//! RVAs point to data within the PE file:
//! - **File offset calculation**: RVA + section base → file offset
//! - **Memory mapping**: RVA directly used when PE is memory-mapped
//! - **Data access**: Binary data reading from calculated positions
//! - **Size determination**: Field type determines data size
//!
//! # Table Dependencies
//! - **Field table**: Required for field reference resolution
//!
//! # ECMA-335 Reference
//! See ECMA-335, Partition II, §22.19 for the `FieldRva` table specification.
use crate::;
/// Loader implementation for the `FieldRva` metadata table.
///
/// This loader processes `FieldRva` table entries which specify Relative Virtual Addresses
/// for fields that have initial data stored in the PE file. These RVAs point to binary
/// data that serves as initial values for static fields and constant data.
///
/// # Errors
/// - Field references cannot be resolved
/// - RVA values are invalid or out of bounds
/// - Memory allocation fails during processing
/// - Concurrent access conflicts occur
/// - PE file structure is malformed
///
/// # ECMA-335 Reference
/// See ECMA-335, Partition II, §22.19 for complete `FieldRva` table specification.
pub ;