[U-Boot] undefine reference to `__bss_end__' error

Simon Glass sjg at chromium.org
Tue Mar 13 01:01:15 CET 2012


Hi Will,

On Mon, Mar 12, 2012 at 3:13 PM, Will Khan <willk at optiscan.com> wrote:
> Hi all.
>
> I'm trying to upgrade my u-boot from 16 May 2009 release (out of tree customized version) to the release version December 2011.  This is for powerpc MPC8349.
> I feel I’m very close to having U-boot successfully built, but I’m getting a symbol error at the end of the final link:
>
> arch/powerpc/cpu/mpc83xx/start.o:(.got2+0x8): undefined reference to `__bss_end__'
> arch/powerpc/lib/libpowerpc.o:(.got2+0x54): undefined reference to `__bss_end__'
>
> I googled around and saw (perhaps  unrelated) that in some cases, the symbol `__bss_end__'  may not be defined.  So, in /arch/powerpc/mpc83xx/Start.s and arch/powerpc/lib/board.c, I manually changed `__bss_end__'   to `_end'.  However, I now get the following error:
>
> arch/powerpc/cpu/mpc83xx/start.o:(.got2+0x8): undefined reference to `_end'
> arch/powerpc/lib/libpowerpc.o:(.got2+0x54): undefined reference to `_end'
>
> So, my question is, is my problem a basic definition of these symbols, and if so, how to define `__bss_end__' or ‘_end’?  (and where is the best place to put the definition)?

Well, _bss_end__ should be defined in the link script - which might be
arch/powerpc/cpu/*/u-boot.lds. But if you have a special link script
for your board then you might need to adjust it. In some places this
symbol is called __bss_end.

But _end is a different symbol, so you shouldn't change one into the other.

Regards,
Simon

>
> Thanks in advance,
> Will
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list