]> git.sur5r.net Git - u-boot/commitdiff
Fix build problems caused by "_end" -> "__bss_end__" rename
authorWolfgang Denk <wd@denx.de>
Tue, 29 Mar 2011 12:34:50 +0000 (14:34 +0200)
committerWolfgang Denk <wd@denx.de>
Thu, 31 Mar 2011 06:54:35 +0000 (08:54 +0200)
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__'

The rename should not be done for the files in the
examples/standalone/ directory, as these are not using the code from
start.S, but do their own BSS clearing, and either use their own
linker scripts or the ones provided by the compilers.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
examples/standalone/mips.lds
examples/standalone/sparc.lds
examples/standalone/stubs.c

index 68ae217b5c57946466f2fc688695d6c91ca0e42a..63a1c92ab623be8b6daa28a2dd236518fc614f11 100644 (file)
@@ -55,5 +55,5 @@ SECTIONS
        .sbss (NOLOAD) : { *(.sbss) }
        .bss (NOLOAD)  : { *(.bss) . = ALIGN(4); }
 
-       __bss_end__ = .;
+       _end = .;
 }
index 7f060b6d179f4860409b1ce9bfe7fa75f66f0315..9733daa86b902cc4bdc77d9a1c951738930d8c15 100644 (file)
@@ -57,5 +57,5 @@ SECTIONS
        }
        . = ALIGN(4);
        __bss_end = .;
-       __bss_end__ = .;
+       _end = .;
 }
index 1379df731e49209b6e950febc3babea50d484843..2d2e7098b7b3cb701ea8de9460483afb66fa0230 100644 (file)
@@ -187,14 +187,14 @@ void __attribute__((unused)) dummy(void)
 #include <_exports.h>
 }
 
-extern unsigned long __bss_start, __bss_end__;
+extern unsigned long __bss_start, _end;
 
 void app_startup(char * const *argv)
 {
        unsigned char * cp = (unsigned char *) &__bss_start;
 
        /* Zero out BSS */
-       while (cp < (unsigned char *)&__bss_end__) {
+       while (cp < (unsigned char *)&_end) {
                *cp++ = 0;
        }