vmbase: Clients separate eh_stack from .data+.bss
Remove the assumption that .data, .bss, and EH stack region are
contiguous e.g. when mapping or clearing them. This prepares the code
for an upcoming change moving the EH stack to a different part of the
writable_data region.
Bug: 377276983
Bug: 381440625
Test: m {pvmfw,rialto,vmbase_example_{bios,kernel}}_bin
Change-Id: Iae6220b1623b81ff9d7b6595be74504f6ec80865
diff --git a/guest/pvmfw/src/memory.rs b/guest/pvmfw/src/memory.rs
index 8e8b338..67a95f4 100644
--- a/guest/pvmfw/src/memory.rs
+++ b/guest/pvmfw/src/memory.rs
@@ -54,7 +54,8 @@
// Stack and scratch ranges are explicitly zeroed and flushed before jumping to payload,
// so dirty state management can be omitted.
- page_table.map_data(&layout::scratch_range().into())?;
+ page_table.map_data(&layout::data_bss_range().into())?;
+ page_table.map_data(&layout::eh_stack_range().into())?;
page_table.map_data(&stack_range().into())?;
page_table.map_code(&layout::text_range().into())?;
page_table.map_rodata(&layout::rodata_range().into())?;