[PATCH 1/1] sandbox: don't refer to symbol _init

Bin Meng bmeng.cn at gmail.com
Wed May 19 05:08:18 CEST 2021


On Wed, May 19, 2021 at 10:42 AM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> 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:

typo: RISC-V

>
>     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 at gmx.de>
> ---
>  common/board_f.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list