diff --git a/experiments/link.x b/experiments/link.x index 2d17193..4559fe9 100644 --- a/experiments/link.x +++ b/experiments/link.x @@ -39,7 +39,6 @@ SECTIONS .bss (NOLOAD) : ALIGN(4) { __bss_start = .; - KEEP(*(.bss.l1_table)); *(.bss .bss.*); . = ALIGN(4); __bss_end = .; diff --git a/libcortex_a9/src/mmu.rs b/libcortex_a9/src/mmu.rs index 498884d..b93c609 100644 --- a/libcortex_a9/src/mmu.rs +++ b/libcortex_a9/src/mmu.rs @@ -94,14 +94,11 @@ impl L1Entry { } const L1_TABLE_SIZE: usize = 4096; -#[doc(hidden)] -#[link_section = ".bss.l1_table"] -#[no_mangle] -pub static mut l1_table: L1Table = L1Table { +static mut l1_table: L1Table = L1Table { table: [L1Entry(0); L1_TABLE_SIZE] }; -#[repr(align(16384))] +#[repr(C, align(16384))] pub struct L1Table { table: [L1Entry; L1_TABLE_SIZE] }