[U-Boot] [RFC PATCH 14/19] Tidy up asm/generic sections.h to include x86 symbols
Simon Glass
sjg at chromium.org
Wed Dec 28 07:35:55 CET 2011
Include some symbols used by x86 and other architectures, then move x86
over to using this header file.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arm/include/asm/u-boot-arm.h | 4 ----
arch/x86/include/asm/u-boot-x86.h | 8 --------
arch/x86/lib/board.c | 1 +
include/asm-generic/sections.h | 18 ++++++++++++++++++
4 files changed, 19 insertions(+), 12 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/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index 755f88a..d3e2f4c 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -24,14 +24,6 @@
#ifndef _U_BOOT_I386_H_
#define _U_BOOT_I386_H_ 1
-/* Exports from the Linker Script */
-extern ulong __text_start;
-extern ulong __data_end;
-extern ulong __rel_dyn_start;
-extern ulong __rel_dyn_end;
-extern ulong __bss_start;
-extern ulong __bss_end;
-
/* cpu/.../cpu.c */
int x86_cpu_init_r(void);
int cpu_init_r(void);
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index 3d00f20..d4bfe88 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -42,6 +42,7 @@
#include <ide.h>
#include <serial.h>
#include <asm/u-boot-x86.h>
+#include <asm-generic/sections.h>
#include <elf.h>
#ifdef CONFIG_BITBANGMII
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 0dac424..f273a30 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -100,4 +100,22 @@ extern ulong _dynsym_start_ofs;
/* End of the region to be relocated, as an offset form _start */
extern ulong _image_copy_end_ofs;
+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 _TEXT_BASE; /* code start */
+
+#else /* don't use offsets: */
+
+/* Exports from the Linker Script */
+extern ulong __data_end;
+extern ulong __rel_dyn_start;
+extern ulong __rel_dyn_end;
+extern ulong __bss_end;
+
+extern ulong _TEXT_BASE; /* code start */
+
+#endif
+
#endif /* _ASM_GENERIC_SECTIONS_H_ */
--
1.7.3.1
More information about the U-Boot
mailing list