From da99144891e424f3a57141366ebabf444db12924 Mon Sep 17 00:00:00 2001 From: Jimmy Zheng Date: Mon, 30 Sep 2024 15:39:31 +0800 Subject: [PATCH] soc: andestech: linker.ld: fix incorrect padding of rom_mpu_padding The rom_mpu_padding section is incorrect NAPOT padding for the address of __rodata_region_end when ROM_BASE is not 0x0, because __rom_region_start is set to the offset of rom_start section. Fixed this by use "__rom_region_start = ABSOLUTE(.);" to keep both __rodata_region_end and __rom_region_start are absolute address. Signed-off-by: Jimmy Zheng --- soc/andestech/ae350/linker.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/andestech/ae350/linker.ld b/soc/andestech/ae350/linker.ld index ff8da59aebc414..4c94c7052123d3 100644 --- a/soc/andestech/ae350/linker.ld +++ b/soc/andestech/ae350/linker.ld @@ -116,7 +116,7 @@ SECTIONS { . = ALIGN(16); MPU_ALIGN(__rom_region_size); - __rom_region_start = .; + __rom_region_start = ABSOLUTE(.); /* Located in generated directory. This file is populated by calling * zephyr_linker_sources(ROM_START ...). */