[U-Boot] [PATCH v4 10/27] arm: Use sections header to obtain link symbols

Simon Glass sjg at chromium.org
Thu Mar 15 03:16:07 CET 2012


Include this header to get access to link symbols, which are otherwise
removed.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v4:
- Use asm/sections.h instead of asm-generic/sections.h

 arch/arm/include/asm/u-boot-arm.h |    4 ----
 arch/arm/lib/board.c              |    1 +
 arch/avr32/cpu/start.S            |    2 +-
 arch/avr32/cpu/u-boot.lds         |    2 +-
 board/cm4008/flash.c              |    1 +
 board/cm41xx/flash.c              |    1 +
 6 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h
index 4ca75f9..7cfae9b 100644
--- a/arch/arm/include/asm/u-boot-arm.h
+++ b/arch/arm/include/asm/u-boot-arm.h
@@ -30,12 +30,8 @@
 #define _U_BOOT_ARM_H_	1
 
 /* for the following variables, see start.S */
-extern ulong _bss_start_ofs;	/* BSS start relative to _start */
-extern ulong _bss_end_ofs;		/* BSS end relative to _start */
-extern ulong _end_ofs;		/* end of image relative to _start */
 extern ulong IRQ_STACK_START;	/* top of IRQ stack */
 extern ulong FIQ_STACK_START;	/* top of FIQ stack */
-extern ulong _TEXT_BASE;	/* code start */
 extern ulong _datarel_start_ofs;
 extern ulong _datarelrolocal_start_ofs;
 extern ulong _datarellocal_start_ofs;
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 500e216..fdd5d15 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -63,6 +63,7 @@
 #ifdef CONFIG_DRIVER_LAN91C96
 #include "../drivers/net/lan91c96.h"
 #endif
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/avr32/cpu/start.S b/arch/avr32/cpu/start.S
index 71cbc52..c8decea 100644
--- a/arch/avr32/cpu/start.S
+++ b/arch/avr32/cpu/start.S
@@ -244,7 +244,7 @@ relocate_code:
 	/* zero out .bss */
 	mov	r0, 0
 	mov	r1, 0
-	lda.w	r9, __bss_end__
+	lda.w	r9, __bss_end
 	sub	r9, r8
 1:	st.d	r10++, r0
 	sub	r9, 8
diff --git a/arch/avr32/cpu/u-boot.lds b/arch/avr32/cpu/u-boot.lds
index 0e532f2..4de2fff 100644
--- a/arch/avr32/cpu/u-boot.lds
+++ b/arch/avr32/cpu/u-boot.lds
@@ -68,5 +68,5 @@ SECTIONS
 		*(.bss.*)
 	}
 	. = ALIGN(8);
-	__bss_end__ = .;
+	__bss_end = .;
 }
diff --git a/board/cm4008/flash.c b/board/cm4008/flash.c
index 5522bf0..0faf197 100644
--- a/board/cm4008/flash.c
+++ b/board/cm4008/flash.c
@@ -29,6 +29,7 @@
 
 #include <common.h>
 #include <linux/byteorder/swab.h>
+#include <asm/sections.h>
 
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];	/* info for FLASH chips */
diff --git a/board/cm41xx/flash.c b/board/cm41xx/flash.c
index 5522bf0..0faf197 100644
--- a/board/cm41xx/flash.c
+++ b/board/cm41xx/flash.c
@@ -29,6 +29,7 @@
 
 #include <common.h>
 #include <linux/byteorder/swab.h>
+#include <asm/sections.h>
 
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];	/* info for FLASH chips */
-- 
1.7.7.3



More information about the U-Boot mailing list