[U-Boot] [PATCH] arm: fix a double-definition error of _start symbol
Masahiro Yamada
yamada.m at jp.panasonic.com
Mon Jun 9 11:44:08 CEST 2014
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
More information about the U-Boot
mailing list