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

Will Khan willk at optiscan.com
Tue Mar 13 22:17:34 CET 2012

> On Mon, Mar 12, 2012 at 3:13 PM, Will Khan <willk at optiscan.com> wrote:
> > 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

Hi Simon.  Thanks -it worked!  It looks like in arch/powerpc/cpu/*/u-boot.lds, "__bss_end__ = . ;" got removed along the way.  I put it back in, and it built fine.

More information about the U-Boot mailing list