]> git.baikalelectronics.ru Git - uboot.git/commit
sandbox: don't refer to symbol _init
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 19 May 2021 10:02:39 +0000 (12:02 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 6 Jul 2021 16:38:03 +0000 (10:38 -0600)
commit685b9ec26e681a81e6e27c9f42bacbcfe76dd446
tree5b63c143d776b7dab82db1adea89ad58ae53cdf0
parentd516c7ff968ed4b1481df39a363aeb7ca1b4b4b7
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>
common/board_f.c