nds32: Use sections header to obtain link symbols
authorKuan-Yu Kuo <ken.kuoky@gmail.com>
Tue, 23 Apr 2013 07:47:47 +0000 (07:47 +0000)
committerMacpaul Lin <macpaul@gmail.com>
Wed, 8 May 2013 04:38:10 +0000 (12:38 +0800)
Include this header to get access to link symbols, which are otherwise
removed.

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
arch/nds32/include/asm/u-boot-nds32.h
arch/nds32/lib/board.c

index f3c7b271e97ba20c78d9107f9dde1e5d3436cfe7..d22eb5b29665290962c1fb46acd0bc72583d0ecf 100644 (file)
 #define _U_BOOT_NDS32_H_       1
 
 /* for the following variables, see start.S */
-extern char __bss_start[];     /* BSS start relative to _start */
-extern ulong __bss_end;                /* BSS end relative to _start */
-extern char _end[];            /* end of image relative to _start */
-extern void _start(void);      /* start of image relative to _start */
-extern ulong _TEXT_BASE;       /* code start */
 extern ulong IRQ_STACK_START;  /* top of IRQ stack */
 extern ulong FIQ_STACK_START;  /* top of FIQ stack */
 
index 57af1bee9b25864318b95e32e6e58cc2f174e66f..1157d8c5035f7e2eb73dd862dfdc3e2a2234ed35 100644 (file)
@@ -36,6 +36,7 @@
 #include <nand.h>
 #include <onenand_uboot.h>
 #include <mmc.h>
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -300,7 +301,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
-       monitor_flash_len = &_end - &_start;
+       monitor_flash_len = (ulong)&_end - (ulong)&_start;
        debug("monitor flash len: %08lX\n", monitor_flash_len);
 
        board_init();   /* Setup chipselects */