vmbase: example: Add bin_end to integration_test
Print the linker variable in the test.
Bug: 238050226
Test: atest vmbase_example.integration_test
Change-Id: I5f78ecc9864bcf2c2def8b4b670425b631ed454c
diff --git a/vmbase/example/src/layout.rs b/vmbase/example/src/layout.rs
index 463738e..c0c4fab 100644
--- a/vmbase/example/src/layout.rs
+++ b/vmbase/example/src/layout.rs
@@ -81,6 +81,10 @@
unsafe { VirtualAddress(&data_lma as *const u8 as usize) }
}
+fn binary_end() -> VirtualAddress {
+ unsafe { VirtualAddress(&bin_end as *const u8 as usize) }
+}
+
pub fn print_addresses() {
let dtb = dtb_range();
println!("dtb: {}..{} ({} bytes)", dtb.start, dtb.end, dtb.end - dtb.start);
@@ -88,6 +92,7 @@
println!("text: {}..{} ({} bytes)", text.start, text.end, text.end - text.start);
let rodata = rodata_range();
println!("rodata: {}..{} ({} bytes)", rodata.start, rodata.end, rodata.end - rodata.start);
+ println!("binary end: {}", binary_end());
let data = data_range();
println!(
"data: {}..{} ({} bytes, loaded at {})",
@@ -132,6 +137,7 @@
static data_begin: u8;
static data_end: u8;
static data_lma: u8;
+ static bin_end: u8;
static bss_begin: u8;
static bss_end: u8;
static boot_stack_begin: u8;