use the end of all assigned iwram data

This commit is contained in:
Corwin 2022-07-30 17:21:46 +01:00
parent a3de583d40
commit cd000ca767
12 changed files with 13 additions and 2 deletions

View file

@ -65,6 +65,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -63,6 +63,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -68,12 +68,12 @@ fn alloc_error(layout: Layout) -> ! {
fn iwram_data_end() -> usize {
extern "C" {
static __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?
(unsafe { &__iwram_data_end }) as *const _ as usize + 0x200
(unsafe { &__iwram_end }) as *const _ as usize
}
fn data_end() -> usize {

View file

@ -65,6 +65,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -63,6 +63,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -65,6 +65,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -63,6 +63,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -65,6 +65,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -65,6 +65,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -63,6 +63,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -65,6 +65,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;

View file

@ -63,6 +63,7 @@ SECTIONS {
.bss : {
*(.bss .bss.*);
. = ALIGN(4);
__iwram_end = ABSOLUTE(.);
} > iwram
__iwram_rom_length_bytes = __iwram_data_end - __iwram_data_start;