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/).
1111
1212- New ` post-init ` feature to run a Rust ` __post_init ` function before jumping to ` main ` .
1313- 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 ` .
1416
1517### Changed
1618
Original file line number Diff line number Diff line change @@ -161,6 +161,19 @@ SECTIONS
161161 . = ALIGN(${ARCH_WIDTH});
162162 __ebss = .;
163163
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+
164177 /* fictitious region that represents the memory available for the heap */
165178 .heap (NOLOAD) : ALIGN(4)
166179 {
You can’t perform that action at this time.
0 commit comments