All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] sandbox: add symbol _init for RISC-V compilation
Date: Fri, 14 May 2021 07:00:22 +0800	[thread overview]
Message-ID: <CAEUhbmXcBhefQrYhtW_k2osYeEUfZdKcKPQf=9uJRNuW0TAyzA@mail.gmail.com> (raw)
In-Reply-To: <20210513144540.497144-1-xypron.glpk@gmx.de>

On Thu, May 13, 2021 at 10:46 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> The sandbox does not build on RISC-V when _init is not defined. Errors like
> the following were observed. Which function was referred to depended on the
> configuration.
>
>     /usr/bin/ld: common/built-in.o: in function `parse_stream_outer':
>     /common/cli_hush.c:3175: undefined reference to `_init'
>     collect2: error: ld returned 1 exit status
>     make: *** [Makefile:1726: u-boot] Error 1
>
>     /usr/bin/ld: common/built-in.o: in function `bootdelay_process':
>     common/autoboot.c:335: undefined reference to `_init'
>     collect2: error: ld returned 1 exit status
>     make: *** [Makefile:1726: u-boot] Error 1
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/sandbox/cpu/u-boot.lds | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds
> index a1f509c9ab..d9e7ffcea3 100644
> --- a/arch/sandbox/cpu/u-boot.lds
> +++ b/arch/sandbox/cpu/u-boot.lds
> @@ -9,6 +9,8 @@ SECTIONS
>  {
>
>         . = ALIGN(4);
> +       /* RISC-V GCC wants this dummy symbol */

Native GCC on RISC-V?

RISC-V GCC sounds like cross-compile for RISC-V

> +       _init = .;
>         .u_boot_list : {
>                 KEEP(*(SORT(.u_boot_list*)));
>         }
> --


Regards,
Bin

  reply	other threads:[~2021-05-13 23:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 14:45 [PATCH 1/1] sandbox: add symbol _init for RISC-V compilation Heinrich Schuchardt
2021-05-13 23:00 ` Bin Meng [this message]
2021-05-14  7:09   ` Heinrich Schuchardt
2021-05-13 23:56 ` Simon Glass
2021-05-14  0:55   ` Bin Meng
2021-05-18 19:29     ` Jim Wilson
2021-05-18 20:58       ` Heinrich Schuchardt
2021-05-18 21:32         ` Jim Wilson
2021-05-18 21:36           ` Jim Wilson
2021-05-19  1:27             ` Bin Meng
2021-05-19  2:26             ` Heinrich Schuchardt
2021-05-14  8:49   ` Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEUhbmXcBhefQrYhtW_k2osYeEUfZdKcKPQf=9uJRNuW0TAyzA@mail.gmail.com' \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.