[U-Boot] [PATCH RFC] Fix build problems caused by "_end" -> "__bss_end__" rename

Po-Yu Chuang
2011-03-28T08:48:12Z

Hi Wolfgang,

On Mon, Mar 28, 2011 at 4:40 PM, Wolfgang Denk <wd@denx.de> wrote:
> Commit 44c6e65 "rename _end to __bss_end__ broke building of a large
> number of systems (at least all PowerPC?):
>
> libstubs.o: In function `app_startup':
> examples/standalone/stubs.c:197: undefined reference to `__bss_end__'
>
> As a workaround (instead of introducing linker scripts) we can
> add a --defsym=__bss_end__=_end
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Po-Yu Chuang <ratbert@faraday-tech.com>
> Cc: Albert Aribaud <albert.aribaud@free.fr>
> ---
>
>
> What I really do not understand is why we don't see the same type of
> undefined reference errors on ARM? ?ALso, on ARM we see __bss_end__
> and _bss_end__, and __bss_start und __bss_start__ - where are the
> other names coming from? [On PPC we see only __bss_start and
> __bss_end__].

Do you mean _end here? If there is __bss_end__ on PPC, then there is
no problem, right?

> ?examples/standalone/Makefile | ? ?1 +
> ?1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
> index c1dfdce..06cf14f 100644
> --- a/examples/standalone/Makefile
> +++ b/examples/standalone/Makefile
> @@ -96,6 +96,7 @@ $(LIB): ? ? ? $(obj).depend $(LIBOBJS)
> ?$(ELF):
> ?$(obj)%: ? ? ? $(obj)%.o $(LIB)
> ? ? ? ? ? ? ? ?$(LD) -g -Ttext $(STANDALONE_LOAD_ADDR) \
> + ? ? ? ? ? ? ? ? ? ? ? --defsym=__bss_end__=_end \
> ? ? ? ? ? ? ? ? ? ? ? ?-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
> ? ? ? ? ? ? ? ? ? ? ? ?-L$(gcclibdir) -lgcc
>
> --
> 1.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>