main: refactor unsafe block for C offsets
Uses the `&raw const` syntax to convert the pointer location of static offsets from C.
This commit is contained in:
+1
-1
@@ -279,7 +279,7 @@ macro_rules! linker_offsets(
|
||||
// TODO: UnsafeCell?
|
||||
static $name: u8;
|
||||
}
|
||||
unsafe { &$name as *const u8 as usize }
|
||||
(&raw const $name) as usize
|
||||
}
|
||||
)*
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user