[Concept,2/2] sandbox: Use a mon_len of 0 with the library
Commit Message
From: Simon Glass <sjg@chromium.org>
In the case of the shared/static libraries, the _end and _init symbols
are not necessarily provided since the linker script is provided by the
program which links against the U-Boot library.
In some cases the memory size can show up as less than available memory,
but enough that there is insufficient memory for U-Boot to start.
It seems better to just set the mon_len to 0 for the library.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/board_f.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -273,7 +273,7 @@ static int setup_mon_len(void)
#elif defined(__ARM__) || defined(__MICROBLAZE__)
gd->mon_len = (ulong)__bss_end - (ulong)_start;
#elif defined(CONFIG_SANDBOX) && !defined(__riscv)
- gd->mon_len = (ulong)_end - (ulong)_init;
+ gd->mon_len = gd_ulib() ? 0 : (ulong)_end - (ulong)_init;
#elif defined(CONFIG_SANDBOX)
/* gcc does not provide _init in crti.o on RISC-V */
gd->mon_len = 0;