riscv: linker: fix duplicate symbol when CONFIG_USERSPACE=y

_image_ram_start symbol is duplicate in CONFIG_USERSPACE. This symbol
should be at the start of app_smem in userspace, so remove another
symbol in CONFIG_USERSPACE.

Signed-off-by: Jim Shu <cwshu@andestech.com>
This commit is contained in:
Jim Shu 2021-01-11 03:20:47 +08:00 committed by Carles Cufí
commit 3f16fdefbf

View file

@ -60,7 +60,7 @@
#ifdef CONFIG_RISCV_PMP #ifdef CONFIG_RISCV_PMP
#define MPU_MIN_SIZE 4 #define MPU_MIN_SIZE 4
#define MPU_MIN_SIZE_ALIGN . = ALIGN(MPU_MIN_SIZE ); #define MPU_MIN_SIZE_ALIGN . = ALIGN(MPU_MIN_SIZE);
#if defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) #if defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
#define MPU_ALIGN(region_size) \ #define MPU_ALIGN(region_size) \
. = ALIGN(MPU_MIN_SIZE); \ . = ALIGN(MPU_MIN_SIZE); \
@ -228,7 +228,9 @@ SECTIONS
*/ */
. = ALIGN(4); . = ALIGN(4);
__bss_start = .; __bss_start = .;
#if !defined(CONFIG_USERSPACE)
_image_ram_start = .; _image_ram_start = .;
#endif /* CONFIG_USERSPACE */
__kernel_ram_start = .; __kernel_ram_start = .;
*(.sbss) *(.sbss)
*(".sbss.*") *(".sbss.*")