From b8ed5a0d917401d9efa45af6849654ed1874e34a Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 9 Sep 2021 10:20:04 +0800 Subject: [PATCH] alloc: fix alignment for riscv32 arch --- artiq/firmware/liballoc_list/lib.rs | 1 + artiq/firmware/runtime/runtime.ld | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/firmware/liballoc_list/lib.rs b/artiq/firmware/liballoc_list/lib.rs index 8af134b0e..f4d93310a 100644 --- a/artiq/firmware/liballoc_list/lib.rs +++ b/artiq/firmware/liballoc_list/lib.rs @@ -13,6 +13,7 @@ const MAGIC_BUSY: usize = 0xFEEDFEED; struct Header { magic: usize, size: usize, + _pad: usize, next: *mut Header } diff --git a/artiq/firmware/runtime/runtime.ld b/artiq/firmware/runtime/runtime.ld index b1a7ad7e3..81138fea3 100644 --- a/artiq/firmware/runtime/runtime.ld +++ b/artiq/firmware/runtime/runtime.ld @@ -75,7 +75,7 @@ SECTIONS _fstack = . - 16; } > runtime - .heap (NOLOAD) : + .heap (NOLOAD) : ALIGN(16) { _fheap = .; . = ORIGIN(runtime) + LENGTH(runtime);