boards/k210: Use 8 byte align in linker script

I noticed sometimes once config changed, it will not launch to shell,
maybe due to
K210 is a 64-bit platform and without misaligned memory access support.

This patch may fix this problem, it will not introduce new issues at least.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2023-04-28 16:02:56 +08:00 committed by Xiang Xiao
parent d58c445ac5
commit 0d3abe6ebb
2 changed files with 10 additions and 8 deletions

View File

@ -53,33 +53,34 @@ SECTIONS
_etext = ABSOLUTE(.);
} > progmem
.init_section : ALIGN(4) {
.init_section : ALIGN(8) {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
. = ALIGN(8);
_einit = ABSOLUTE(.);
} > progmem
_eronly = ABSOLUTE(.);
.data : ALIGN(4) {
.data : ALIGN(8) {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.sdata .sdata.* .sdata2.*)
*(.gnu.linkonce.d.*)
*(.gnu.linkonce.s.*)
CONSTRUCTORS
. = ALIGN(4);
. = ALIGN(8);
_edata = ABSOLUTE(.);
} > sram AT > progmem
.bss : ALIGN(4) {
.bss : ALIGN(8) {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.sbss .sbss.*)
*(.gnu.linkonce.b.*)
*(.gnu.linkonce.sb.*)
*(COMMON)
. = ALIGN(32);
. = ALIGN(8);
_ebss = ABSOLUTE(.);
} > sram

View File

@ -45,9 +45,10 @@ SECTIONS
_etext = ABSOLUTE(.);
} > uflash
.init_section : {
.init_section : ALIGN(8) {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
. = ALIGN(8);
_einit = ABSOLUTE(.);
} > uflash
@ -63,7 +64,7 @@ SECTIONS
*(.sdata .sdata.* .sdata2.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
. = ALIGN(4);
. = ALIGN(8);
_edata = ABSOLUTE(.);
} > usram AT > uflash
@ -73,7 +74,7 @@ SECTIONS
*(.sbss .sbss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
. = ALIGN(8);
_ebss = ABSOLUTE(.);
} > usram