diff mbox series

[U-Boot,078/126] x86: Define the SPL image start

Message ID 20190925145750.200592-79-sjg@chromium.org
State Superseded
Delegated to: Bin Meng
Headers show
Series x86: Add initial support for apollolake | expand

Commit Message

Simon Glass Sept. 25, 2019, 2:57 p.m. UTC
Define this symbol so that we can use binman symbols correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/cpu/u-boot-spl.lds | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Bin Meng Oct. 10, 2019, 7:09 a.m. UTC | #1
Hi Simon,

On Wed, Sep 25, 2019 at 10:59 PM Simon Glass <sjg@chromium.org> wrote:
>
> Define this symbol so that we can use binman symbols correctly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/cpu/u-boot-spl.lds | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.lds
> index c1e9bfbf66f..e6c22895b35 100644
> --- a/arch/x86/cpu/u-boot-spl.lds
> +++ b/arch/x86/cpu/u-boot-spl.lds
> @@ -17,7 +17,10 @@ SECTIONS
>
>         . = IMAGE_TEXT_BASE;    /* Location of bootcode in flash */
>         __text_start = .;
> -       .text  : { *(.text*); }
> +       .text  : {
> +               __image_copy_start = .;

I see this symbol is currently used in ARM. What's the purpose for x86?

> +               *(.text*);
> +       }
>
>         . = ALIGN(4);
>
> --

Regards,
Bin
Simon Glass Oct. 10, 2019, 5:06 p.m. UTC | #2
Hi Bin,

On Thu, 10 Oct 2019 at 01:09, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Wed, Sep 25, 2019 at 10:59 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Define this symbol so that we can use binman symbols correctly.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  arch/x86/cpu/u-boot-spl.lds | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.lds
> > index c1e9bfbf66f..e6c22895b35 100644
> > --- a/arch/x86/cpu/u-boot-spl.lds
> > +++ b/arch/x86/cpu/u-boot-spl.lds
> > @@ -17,7 +17,10 @@ SECTIONS
> >
> >         . = IMAGE_TEXT_BASE;    /* Location of bootcode in flash */
> >         __text_start = .;
> > -       .text  : { *(.text*); }
> > +       .text  : {
> > +               __image_copy_start = .;
>
> I see this symbol is currently used in ARM. What's the purpose for x86?

It defines the start address of the image. This is needed by binman
since it needs to be able to find symbols mentioned in the elf file.

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.lds
index c1e9bfbf66f..e6c22895b35 100644
--- a/arch/x86/cpu/u-boot-spl.lds
+++ b/arch/x86/cpu/u-boot-spl.lds
@@ -17,7 +17,10 @@  SECTIONS
 
 	. = IMAGE_TEXT_BASE;	/* Location of bootcode in flash */
 	__text_start = .;
-	.text  : { *(.text*); }
+	.text  : {
+		__image_copy_start = .;
+		*(.text*);
+	}
 
 	. = ALIGN(4);