diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-05-19 12:02:39 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-07-06 10:38:03 -0600 |
commit | 3c9fc23c44317be82be94e461ff260ec7f083523 (patch) | |
tree | 5b63c143d776b7dab82db1adea89ad58ae53cdf0 /common/board_f.c | |
parent | 825a9a94e1a5795e545156ead664a85403cda0e1 (diff) | |
download | u-boot-3c9fc23c44317be82be94e461ff260ec7f083523.tar.gz |
sandbox: don't refer to symbol _init
GCC provides a symbol _init in crti.o on x86_64 and aarch64 but not on
RISC-V. The following lines leads to a build error for sandbox_defconfig on
RISC-V due to the missing symbol:
common/board_f.c:269:
#elif defined(CONFIG_SANDBOX) || defined(CONFIG_EFI_APP)
gd->mon_len = (ulong)&_end - (ulong)_init;
The sandbox code is not copied into the memory allocated using mmap().
Hence we can safely use gd->mon_len = 0 to avoid the reference to _init.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'common/board_f.c')
-rw-r--r-- | common/board_f.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/board_f.c b/common/board_f.c index 203e965799..c1b8e63e56 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -265,7 +265,9 @@ static int setup_mon_len(void) { #if defined(__ARM__) || defined(__MICROBLAZE__) gd->mon_len = (ulong)&__bss_end - (ulong)_start; -#elif defined(CONFIG_SANDBOX) || defined(CONFIG_EFI_APP) +#elif defined(CONFIG_SANDBOX) + gd->mon_len = 0; +#elif defined(CONFIG_EFI_APP) gd->mon_len = (ulong)&_end - (ulong)_init; #elif defined(CONFIG_NIOS2) || defined(CONFIG_XTENSA) gd->mon_len = CONFIG_SYS_MONITOR_LEN; |