* [U-Boot] [PATCH] arm: fix a double-definition error of _start symbol
@ 2014-05-27 2:16 Masahiro Yamada
2014-06-09 8:40 ` Albert ARIBAUD
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2014-05-27 2:16 UTC (permalink / raw)
To: u-boot
The symbol "_start" is defined twice in arch/arm/lib/vectors.S:
around line 48 and line 54.
If CONFIG_SYS_DV_NOR_BOOT_CFG is defined (as on calimain board),
build fails:
arch/arm/lib/vectors.S: Assembler messages:
arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
make[1]: *** [arch/arm/lib/vectors.o] Error 1
make: *** [arch/arm/lib] Error 2
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
arch/arm/lib/vectors.S | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index fad00da..493f337 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -45,8 +45,6 @@
*************************************************************************
*/
-_start:
-
#ifdef CONFIG_SYS_DV_NOR_BOOT_CFG
.word CONFIG_SYS_DV_NOR_BOOT_CFG
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm: fix a double-definition error of _start symbol
2014-05-27 2:16 [U-Boot] [PATCH] arm: fix a double-definition error of _start symbol Masahiro Yamada
@ 2014-06-09 8:40 ` Albert ARIBAUD
2014-06-09 9:44 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Albert ARIBAUD @ 2014-06-09 8:40 UTC (permalink / raw)
To: u-boot
Hi Masahiro,
On Tue, 27 May 2014 11:16:29 +0900, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:
> The symbol "_start" is defined twice in arch/arm/lib/vectors.S:
> around line 48 and line 54.
>
> If CONFIG_SYS_DV_NOR_BOOT_CFG is defined (as on calimain board),
> build fails:
>
> arch/arm/lib/vectors.S: Assembler messages:
> arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
> make[1]: *** [arch/arm/lib/vectors.o] Error 1
> make: *** [arch/arm/lib] Error 2
Apart from the shame of having written this double definition myself and
missed it entirely, I am surprised because this error (obviously) does
not occur on my setup. Which toolchain are you using?
Anyway:
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> ---
> arch/arm/lib/vectors.S | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
> index fad00da..493f337 100644
> --- a/arch/arm/lib/vectors.S
> +++ b/arch/arm/lib/vectors.S
> @@ -45,8 +45,6 @@
> *************************************************************************
> */
>
> -_start:
> -
> #ifdef CONFIG_SYS_DV_NOR_BOOT_CFG
> .word CONFIG_SYS_DV_NOR_BOOT_CFG
> #endif
Applied to u-boot-arm/master, thanks!
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm: fix a double-definition error of _start symbol
2014-06-09 8:40 ` Albert ARIBAUD
@ 2014-06-09 9:44 ` Masahiro Yamada
2014-06-09 9:58 ` Albert ARIBAUD
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2014-06-09 9:44 UTC (permalink / raw)
To: u-boot
Hi Albert,
>
> Apart from the shame of having written this double definition myself and
> missed it entirely, I am surprised because this error (obviously) does
> not occur on my setup. Which toolchain are you using?
It is not because of the toolchain difference.
You should understand the problem I mentioned in the other mail.
In your tree, CONFIG_SYS_DV_NOR_BOOT_CFG is never defined
in arch/arm/lib/vectors.S
So, arch/arm/lib/vectors.S in your source tree in always like this:
_start:
_start:
ldr pc, _reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
ldr pc, _data_abort
ldr pc, _not_used
ldr pc, _irq
ldr pc, _fiq
It is true that "_start" symbol appears twice,
but both are pointing to the same address.
That's why you never see the error message.
(I mean, this problem is hidden behind another problem.)
You should fix the first problem.
http://patchwork.ozlabs.org/patch/352484/
And then, the code should be like follows where CONFIG_SYS_DV_NOR_BOOT_CFG is defined.
_start:
.word CONFIG_SYS_DV_NOR_BOOT_CFG
_start:
ldr pc, _reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
ldr pc, _data_abort
ldr pc, _not_used
ldr pc, _irq
ldr pc, _fiq
In this case, two "_start" symbols point the different address.
You will see the error message like this:
> > arch/arm/lib/vectors.S: Assembler messages:
> > arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
> > make[1]: *** [arch/arm/lib/vectors.o] Error 1
> > make: *** [arch/arm/lib] Error 2
>
> Applied to u-boot-arm/master, thanks!
No.
Please apply
http://patchwork.ozlabs.org/patch/352484/
http://patchwork.ozlabs.org/patch/352672/
in this order to keep the commit-description sane.
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm: fix a double-definition error of _start symbol
2014-06-09 9:44 ` Masahiro Yamada
@ 2014-06-09 9:58 ` Albert ARIBAUD
0 siblings, 0 replies; 4+ messages in thread
From: Albert ARIBAUD @ 2014-06-09 9:58 UTC (permalink / raw)
To: u-boot
Hi Masahiro,
On Mon, 09 Jun 2014 18:44:08 +0900, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:
> Hi Albert,
>
>
> >
> > Apart from the shame of having written this double definition myself and
> > missed it entirely, I am surprised because this error (obviously) does
> > not occur on my setup. Which toolchain are you using?
>
> It is not because of the toolchain difference.
>
> You should understand the problem I mentioned in the other mail.
>
> In your tree, CONFIG_SYS_DV_NOR_BOOT_CFG is never defined
> in arch/arm/lib/vectors.S
>
> So, arch/arm/lib/vectors.S in your source tree in always like this:
>
> _start:
> _start:
> ldr pc, _reset
> ldr pc, _undefined_instruction
> ldr pc, _software_interrupt
> ldr pc, _prefetch_abort
> ldr pc, _data_abort
> ldr pc, _not_used
> ldr pc, _irq
> ldr pc, _fiq
>
>
> It is true that "_start" symbol appears twice,
> but both are pointing to the same address.
>
> That's why you never see the error message.
> (I mean, this problem is hidden behind another problem.)
>
> You should fix the first problem.
> http://patchwork.ozlabs.org/patch/352484/
>
>
> And then, the code should be like follows where CONFIG_SYS_DV_NOR_BOOT_CFG is defined.
>
> _start:
> .word CONFIG_SYS_DV_NOR_BOOT_CFG
> _start:
> ldr pc, _reset
> ldr pc, _undefined_instruction
> ldr pc, _software_interrupt
> ldr pc, _prefetch_abort
> ldr pc, _data_abort
> ldr pc, _not_used
> ldr pc, _irq
> ldr pc, _fiq
>
> In this case, two "_start" symbols point the different address.
> You will see the error message like this:
>
> > > arch/arm/lib/vectors.S: Assembler messages:
> > > arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
> > > make[1]: *** [arch/arm/lib/vectors.o] Error 1
> > > make: *** [arch/arm/lib] Error 2
Thanks for the clarification. However:
> > Applied to u-boot-arm/master, thanks!
>
> No.
>
> Please apply
> http://patchwork.ozlabs.org/patch/352484/
> http://patchwork.ozlabs.org/patch/352672/
>
> in this order to keep the commit-description sane.
See my comment on the first patch commit message.
Besides, the second patch is a fix of its own accord, regardless to the
fact that it was hidden by another bug, so I'll keep it in as-is.
(incidentally, patches which do have ordering constraints should be
posted as a series.)
> Best Regards
> Masahiro Yamada
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-09 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 2:16 [U-Boot] [PATCH] arm: fix a double-definition error of _start symbol Masahiro Yamada
2014-06-09 8:40 ` Albert ARIBAUD
2014-06-09 9:44 ` Masahiro Yamada
2014-06-09 9:58 ` Albert ARIBAUD
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.