From 6176717125bbe12c7b08e72c0592b819595ee761 Mon Sep 17 00:00:00 2001 From: songyanguang <345810377@qq.com> Date: Mon, 20 Jan 2025 10:58:09 +0800 Subject: [PATCH] Fixed non-zero global variable issue in kernel --- .../arch/riscv/rv64gc/preboot_for_jh7110/jh7110.lds | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ubiquitous/XiZi_AIoT/hardkernel/arch/riscv/rv64gc/preboot_for_jh7110/jh7110.lds b/Ubiquitous/XiZi_AIoT/hardkernel/arch/riscv/rv64gc/preboot_for_jh7110/jh7110.lds index f3630b83c..93f0e549e 100644 --- a/Ubiquitous/XiZi_AIoT/hardkernel/arch/riscv/rv64gc/preboot_for_jh7110/jh7110.lds +++ b/Ubiquitous/XiZi_AIoT/hardkernel/arch/riscv/rv64gc/preboot_for_jh7110/jh7110.lds @@ -85,6 +85,7 @@ SECTIONS PROVIDE(boot_end_addr = .); } +. = ALIGN(0x1000); .text : { . = ALIGN(0x1000); *(.text .text.*) @@ -92,6 +93,9 @@ SECTIONS . = ALIGN(0x1000); .data : { + . = ALIGN(16); + *(.sdata .sdata.*) + . = ALIGN(16); *(.data .data.*) __start_init_task = .;