From 008a9954292980b34fc20cc519a19e92b4ac077d Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 30 Apr 2020 03:36:18 +0200 Subject: [PATCH] libcortex_a9: remove mmu::l1_table alignment through linker script no longer needed, #[repr(16384)] works now --- experiments/link.x | 1 - libcortex_a9/src/mmu.rs | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) 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] }