diff --git a/agb/src/agb_alloc/mod.rs b/agb/src/agb_alloc/mod.rs index 53f3d5f8..2a16b7ac 100644 --- a/agb/src/agb_alloc/mod.rs +++ b/agb/src/agb_alloc/mod.rs @@ -129,8 +129,8 @@ fn iwram_data_end() -> usize { static __iwram_end: usize; } - // TODO: This seems completely wrong, but without the &, rust generates - // a double dereference :/. Maybe a bug in nightly? + // Symbols defined in the linker have an address *but no data or value*. + // As strange as this looks, they are only useful to take the address of. (unsafe { &__iwram_end }) as *const _ as usize } @@ -139,8 +139,8 @@ fn data_end() -> usize { static __ewram_data_end: usize; } - // TODO: This seems completely wrong, but without the &, rust generates - // a double dereference :/. Maybe a bug in nightly? + // Symbols defined in the linker have an address *but no data or value*. + // As strange as this looks, they are only useful to take the address of. (unsafe { &__ewram_data_end }) as *const _ as usize }