From 9f092efe24a712add30a0512a922cd64d3666069 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 21 Oct 2019 16:38:04 -0500 Subject: [PATCH] do not zero late resource memory on boot --- macros/src/codegen/resources.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/macros/src/codegen/resources.rs b/macros/src/codegen/resources.rs index bec46020e0..8cb788d1ae 100644 --- a/macros/src/codegen/resources.rs +++ b/macros/src/codegen/resources.rs @@ -32,7 +32,11 @@ pub fn codegen( cross_initialized: false, } => ( util::cfg_core(*core, app.args.cores), - util::link_section("data", *core), + if expr.is_none() { + util::link_section_uninit(Some(*core)) + } else { + util::link_section("data", *core) + }, ), // shared `static`s and cross-initialized resources need to be in `.shared` memory @@ -42,7 +46,11 @@ pub fn codegen( } else { None }, - None, + if expr.is_none() { + util::link_section_uninit(None) + } else { + None + }, ), };