Standardise and require safety comments in vmbase.
Bug: 290018030
Test: m vmbase_example_bin
Change-Id: Ic5704d6cd9b2a4090fa9758d7a65a56e83c4286c
diff --git a/vmbase/src/layout/mod.rs b/vmbase/src/layout/mod.rs
index 00d7f9a..b8021b7 100644
--- a/vmbase/src/layout/mod.rs
+++ b/vmbase/src/layout/mod.rs
@@ -28,6 +28,8 @@
#[macro_export]
macro_rules! linker_addr {
($symbol:ident) => {{
+ // SAFETY: We're just getting the address of an extern static symbol provided by the linker,
+ // not dereferencing it.
unsafe { addr_of!($crate::linker::$symbol) as usize }
}};
}