diff --git a/CHANGELOG b/CHANGELOG
index 3923ca8ed69df8e5e9333636e3305ae9fe17ef31..cd057958fbb32ee15659cd1e056a734497733213 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@
 Changes for U-Boot 1.1.1:
 ======================================================================
 
+* add startup code to clear the BSS of standalone applications
+
 * Fix if / elif handling bug in HUSH shell
 
 ======================================================================
diff --git a/examples/mips.lds b/examples/mips.lds
index 8ed01c44586a3b8d9a0c6f610e5bffa9cbae8065..9d9849bf5c2deede742a3693ee1ca626415e041c 100644
--- a/examples/mips.lds
+++ b/examples/mips.lds
@@ -51,6 +51,9 @@ SECTIONS
 	.sdata  : { *(.sdata) }
 
 	. = ALIGN(4);
+	__bss_start = .;
 	.sbss  : { *(.sbss) }
 	.bss  : { *(.bss) }
+
+	_end = .;
 }
diff --git a/examples/nios.lds b/examples/nios.lds
index 527eb3ad45f5d2e3829640e5cb67b7079c8157ce..dd5bfad7b1141e2e5dda8cf91deb6c5f087dd484 100644
--- a/examples/nios.lds
+++ b/examples/nios.lds
@@ -57,4 +57,5 @@ SECTIONS
 	}
 	. = ALIGN(4);
 	__bss_end = .;
+	_end = .;
 }
diff --git a/examples/stubs.c b/examples/stubs.c
index a26337a926b169ff3780772ec69b8a9d11fe993a..a897d0d213d95d5d2692ce8e26805d704ef3e65a 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -110,8 +110,17 @@ static void __attribute__((unused)) dummy(void)
 #include <_exports.h>
 }
 
+extern unsigned long __bss_start, _end;
+
 void app_startup(char **argv)
 {
+	unsigned long * cp = &__bss_start;
+
+	/* Zero out BSS */
+	while (cp < &_end) {
+		*cp++ = 0;
+	}
+
 #if defined(CONFIG_I386)
 	/* x86 does not have a dedicated register for passing global_data */
 	global_data = (gd_t *)argv[-1];