File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
11
11
12
12
- New ` post-init ` feature to run a Rust ` __post_init ` function before jumping to ` main ` .
13
13
- New ` #[riscv_rt::post_init] ` attribute to aid in the definition of the ` __post_init ` function.
14
+ - Added ` .uninit ` section to the linker file. Due to its similarities with ` .bss ` , the
15
+ linker will place this new section in ` REGION_BSS ` .
14
16
15
17
### Changed
16
18
Original file line number Diff line number Diff line change @@ -161,6 +161,19 @@ SECTIONS
161
161
. = ALIGN(${ARCH_WIDTH});
162
162
__ebss = .;
163
163
164
+ /* Uninitialized data segment. In contrast with .bss, .uninit is not initialized to zero by
165
+ * the runtime, and might contain residual data from previous executions or random values
166
+ * if not explicitly initialized. While .bss and .uninit are different sections, they are
167
+ * both allocated at REGION_BSS, as their purpose is similar. */
168
+ .uninit (NOLOAD) : ALIGN(${ARCH_WIDTH})
169
+ {
170
+ . = ALIGN(${ARCH_WIDTH});
171
+ __suninit = .;
172
+ *(.uninit .uninit.*);
173
+ . = ALIGN(${ARCH_WIDTH});
174
+ __euninit = .;
175
+ } > REGION_BSS
176
+
164
177
/* fictitious region that represents the memory available for the heap */
165
178
.heap (NOLOAD) : ALIGN(4)
166
179
{
You can’t perform that action at this time.
0 commit comments