mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
sandbox: Bring back setting mon_len in global_data
This change was made for the benefit of RISC-V but broke other architectures also. In particular, tracing cannot work without this value. Add it back for architectures which support it. Fixes: 3c9fc23c443 ("sandbox: don't refer to symbol _init") Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
41cd6fab03
commit
2c88d5e110
@ -290,7 +290,10 @@ static int setup_mon_len(void)
|
|||||||
{
|
{
|
||||||
#if defined(__ARM__) || defined(__MICROBLAZE__)
|
#if defined(__ARM__) || defined(__MICROBLAZE__)
|
||||||
gd->mon_len = (ulong)&__bss_end - (ulong)_start;
|
gd->mon_len = (ulong)&__bss_end - (ulong)_start;
|
||||||
|
#elif defined(CONFIG_SANDBOX) && !defined(__riscv)
|
||||||
|
gd->mon_len = (ulong)&_end - (ulong)_init;
|
||||||
#elif defined(CONFIG_SANDBOX)
|
#elif defined(CONFIG_SANDBOX)
|
||||||
|
/* gcc does not provide _init in crti.o on RISC-V */
|
||||||
gd->mon_len = 0;
|
gd->mon_len = 0;
|
||||||
#elif defined(CONFIG_EFI_APP)
|
#elif defined(CONFIG_EFI_APP)
|
||||||
gd->mon_len = (ulong)&_end - (ulong)_init;
|
gd->mon_len = (ulong)&_end - (ulong)_init;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user