summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-03-05 14:39:39 +0000
committerTom Rini <trini@ti.com>2013-03-15 16:13:58 -0400
commit716cc8cc7f0b935db1b7262cf73b00c9e0ea76ee (patch)
treeb9ddba60a4f8ee455a7a70b388fbbf70b41670d7 /examples
parente103b7ae903dffc8e35cd676c1a72712dec14382 (diff)
Change stub example to use asm-generic/sections.h
We can use the declarations of __bss_start and _end from this header instead of declaring them locally. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/stubs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 15e9afcacd..8fb17653b0 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -217,16 +217,15 @@ void __attribute__((unused)) dummy(void)
#include <_exports.h>
}
-extern unsigned long __bss_start, _end;
+#include <asm/sections.h>
void app_startup(char * const *argv)
{
- unsigned char * cp = (unsigned char *) &__bss_start;
+ char *cp = __bss_start;
/* Zero out BSS */
- while (cp < (unsigned char *)&_end) {
+ while (cp < _end)
*cp++ = 0;
- }
#if defined(CONFIG_X86)
/* x86 does not have a dedicated register for passing global_data */