Skip to content

Commit

Permalink
soc: andestech: linker.ld: fix incorrect padding of rom_mpu_padding
Browse files Browse the repository at this point in the history
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 <jimmyzhe@andestech.com>
  • Loading branch information
jimmyzhe authored and carlescufi committed Oct 23, 2024
1 parent 9e1b3bb commit da99144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soc/andestech/ae350/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...).
*/
Expand Down

0 comments on commit da99144

Please sign in to comment.